aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md139
-rw-r--r--config/p10k-classic.zsh17
-rw-r--r--config/p10k-lean-8colors.zsh19
-rw-r--r--config/p10k-lean.zsh19
-rw-r--r--config/p10k-pure.zsh2
-rw-r--r--config/p10k-rainbow.zsh23
-rw-r--r--config/p10k-robbyrussell.zsh2
-rw-r--r--font.md38
-rwxr-xr-xgitstatus/build31
-rw-r--r--gitstatus/build.info6
-rw-r--r--gitstatus/install.info22
-rwxr-xr-xgitstatus/mbuild52
-rw-r--r--internal/p10k.zsh86
-rw-r--r--internal/wizard.zsh12
14 files changed, 348 insertions, 120 deletions
diff --git a/README.md b/README.md
index fbcced45..a0ce7d03 100644
--- a/README.md
+++ b/README.md
@@ -216,8 +216,8 @@ Here's the relevant parameter for kubernetes context:
```zsh
# Show prompt segment "kubecontext" only when the command you are typing
-# invokes kubectl, helm, kubens, kubectx, oc, istioctl, kogito, k9s, helmfile, flux, fluxctl or stern.
-typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern'
+# invokes kubectl, helm, kubens, kubectx, oc, istioctl, kogito, k9s, helmfile, flux, fluxctl, stern, kubeseal, or skaffold.
+typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold'
```
To customize when different prompt segments are shown, open `~/.p10k.zsh`, search for
@@ -303,7 +303,7 @@ To ~~ridiculous~~ extravagant:
Powerlevel10k comes with dozens of built-in high quality segments. When you run `p10k configure`
and choose any style except [Pure](#pure-compatibility), many of these segments get enabled by
-default while others be manually enabled by opening `~/.p10k.zsh` and uncommenting them. You can
+default while others can be manually enabled by opening `~/.p10k.zsh` and uncommenting them. You can
enable as many segments as you like. It won't slow down your prompt or Zsh startup.
| Segment | Meaning |
@@ -344,6 +344,7 @@ enable as many segments as you like. It won't slow down your prompt or Zsh start
| `nvm` | node.js environment from [nvm](https://github.com/nvm-sh/nvm) |
| `os_icon` | your OS logo (apple for macOS, swirl for debian, etc.) |
| `package` | `name@version` from [package.json](https://docs.npmjs.com/files/package.json) |
+| `perlbrew` | perl version from [perlbrew](https://github.com/gugod/App-perlbrew) |
| `phpenv` | php environment from [phpenv](https://github.com/phpenv/phpenv) |
| `php_version` | [php](https://www.php.net/) version |
| `plenv` | perl environment from [plenv](https://github.com/tokuhirom/plenv) |
@@ -356,6 +357,7 @@ enable as many segments as you like. It won't slow down your prompt or Zsh start
| `rbenv` | ruby environment from [rbenv](https://github.com/rbenv/rbenv) |
| `rust_version` | [rustc](https://www.rust-lang.org) version |
| `rvm` | ruby environment from [rvm](https://rvm.io) |
+| `scalaenv` | scala version from [scalaenv](https://github.com/scalaenv/scalaenv) |
| `status` | exit code of the last command |
| `swap` | used swap |
| `taskwarrior` | [taskwarrior](https://taskwarrior.org/) task count |
@@ -368,6 +370,7 @@ enable as many segments as you like. It won't slow down your prompt or Zsh start
| `vcs` | Git repository status |
| `vim_shell` | [vim](https://www.vim.org/) shell (`:sh`) |
| `virtualenv` | python environment from [venv](https://docs.python.org/3/library/venv.html) |
+| `vi_mode` | vi mode (you don't need this if you've enabled prompt_char) |
| `vpn_ip` | virtual private network indicator |
| `wifi` | WiFi speed |
| `xplr` | [xplr](https://github.com/sayanarijit/xplr) shell |
@@ -401,13 +404,17 @@ Powerlevel10k.
- [Prezto](#prezto)
- [Zim](#zim)
- [Antibody](#antibody)
+- [Antidote](#antidote)
- [Antigen](#antigen)
- [Zplug](#zplug)
- [Zgen](#zgen)
- [Zplugin](#zplugin)
- [Zinit](#zinit)
+- [Zi](#zi)
- [Homebrew](#homebrew)
- [Arch Linux](#arch-linux)
+- [Alpine Linux](#arch-linux)
+- [Fig](#fig)
### Manual
@@ -454,6 +461,10 @@ Add `zmodule romkatv/powerlevel10k --use degit` to `~/.zimrc` and run `zimfw ins
Add `antibody bundle romkatv/powerlevel10k` to `~/.zshrc`.
+### Antidote
+
+Add `romkatv/powerlevel10k` to `~/.zsh_plugins.txt`.
+
### Antigen
Add `antigen theme romkatv/powerlevel10k` to `~/.zshrc`. Make sure you have `antigen apply`
@@ -481,6 +492,13 @@ Add `zinit ice depth=1; zinit light romkatv/powerlevel10k` to `~/.zshrc`.
The use of `depth=1` ice is optional. Other types of ice are neither recommended nor officially
supported by Powerlevel10k.
+### Zi
+
+Add `zi ice depth=1; zi light romkatv/powerlevel10k` to `~/.zshrc`.
+
+The use of `depth=1` ice is optional. Other types of ice are neither recommended nor officially
+supported by Powerlevel10k.
+
### Homebrew
```zsh
@@ -503,6 +521,19 @@ There is also [zsh-theme-powerlevel10k](
Historically, [it has been breaking often and for extended periods of time](
https://github.com/romkatv/powerlevel10k/pull/786). **Do not use it.**
+### Alpine Linux
+
+```zsh
+apk add zsh zsh-theme-powerlevel10k
+mkdir -p ~/.local/share/zsh/plugins
+ln -s /usr/share/zsh/plugins/powerlevel10k ~/.local/share/zsh/plugins/
+```
+
+### Fig
+
+Follow the instructions on
+[this page](https://fig.io/plugins/other/powerlevel10k).
+
## Configuration
- [For new users](#for-new-users)
@@ -621,11 +652,9 @@ If you are using a different terminal, proceed with manual font installation.
*Custom font* under *Text Appearance* and select `MesloLGS NF Regular`.
- **Windows Console Host** (the old thing): Click the icon in the top left corner, then
*Properties → Font* and set *Font* to `MesloLGS NF`.
- - **Windows Terminal** by Microsoft (the new thing): Open `settings.json` (<kbd>Ctrl+Shift+,</kbd>),
- search for `fontFace` and set the value to `MesloLGS NF` for every profile. If you don't find
- `fontFace`, add it under *profiles → defaults*. See [this settings file](
- https://raw.githubusercontent.com/romkatv/dotfiles-public/aba0e6c4657d705ed6c344d700d659977385f25c/dotfiles/microsoft-terminal-settings.json)
- for example.
+ - **Windows Terminal** by Microsoft (the new thing): Open *Settings* (<kbd>Ctrl+,</kbd>), click
+ either on the selected profile under *Profiles* or on *Defaults*, click *Appearance* and set
+ *Font face* to `MesloLGS NF`.
- **IntelliJ** (and other IDEs by Jet Brains): Open *IDE → Edit → Preferences → Editor →
Color Scheme → Console Font*. Select *Use console font instead of the default* and set the font
name to `MesloLGS NF`.
@@ -686,6 +715,36 @@ If you are using a different terminal, proceed with manual font installation.
```
After changing the config run `xrdb ~/.Xresources` to reload it. The new config is applied to
all new terminals.
+ - Crostini (Linux on Chrome OS): Open
+ chrome-untrusted://terminal/html/nassh_preferences_editor.html, set *Text font family* to
+ `'MesloLGS NF'` (including the quotes) and *Custom CSS (inline text)* to the following:
+ ```css
+ @font-face {
+ font-family: "MesloLGS NF";
+ src: url("https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/MesloLGS%20NF%20Regular.ttf");
+ font-weight: normal;
+ font-style: normal;
+ }
+ @font-face {
+ font-family: "MesloLGS NF";
+ src: url("https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/MesloLGS%20NF%20Bold.ttf");
+ font-weight: bold;
+ font-style: normal;
+ }
+ @font-face {
+ font-family: "MesloLGS NF";
+ src: url("https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/MesloLGS%20NF%20Italic.ttf");
+ font-weight: normal;
+ font-style: italic;
+ }
+ @font-face {
+ font-family: "MesloLGS NF";
+ src: url("https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/MesloLGS%20NF%20Bold%20Italic.ttf");
+ font-weight: bold;
+ font-style: italic;
+ }
+ ```
+ **_CAVEAT_**: If you open the normal terminal preferences these settings will be overwritten.
1. Run `p10k configure` to generate a new `~/.p10k.zsh`. The old config may work
incorrectly with the new font.
@@ -752,19 +811,22 @@ Powerlevel10k is released under the
The command to update Powerlevel10k depends on how it was installed.
-| Installation | Update command |
-|---------------------------|-------------------------------------------------------------|
-| [Manual](#manual) | `git -C ~/powerlevel10k pull` |
-| [Oh My Zsh](#oh-my-zsh) | `git -C ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k pull` |
-| [Prezto](#prezto) | `zprezto-update` |
-| [Zim](#zim) | `zimfw update` |
-| [Antigen](#antigen) | `antigen update` |
-| [Zplug](#zplug) | `zplug update` |
-| [Zgen](#zgen) | `zgen update` |
-| [Zplugin](#zplugin) | `zplugin update` |
-| [Zinit](#zinit) | `zinit update` |
-| [Homebrew](#homebrew) | `brew update && brew upgrade` |
-| [Arch Linux](#arch-linux) | `yay -S --noconfirm zsh-theme-powerlevel10k-git` |
+| Installation | Update command |
+|-------------------------------|-------------------------------------------------------------|
+| [Manual](#manual) | `git -C ~/powerlevel10k pull` |
+| [Oh My Zsh](#oh-my-zsh) | `git -C ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k pull` |
+| [Prezto](#prezto) | `zprezto-update` |
+| [Zim](#zim) | `zimfw update` |
+| [Antigen](#antigen) | `antigen update` |
+| [Antidote](#antidote) | `antidote update` |
+| [Zplug](#zplug) | `zplug update` |
+| [Zgen](#zgen) | `zgen update` |
+| [Zplugin](#zplugin) | `zplugin update` |
+| [Zinit](#zinit) | `zinit update` |
+| [Zi](#zi) | `zi update` |
+| [Homebrew](#homebrew) | `brew update && brew upgrade` |
+| [Arch Linux](#arch-linux) | `yay -S --noconfirm zsh-theme-powerlevel10k-git` |
+| [Alpine Linux](#alpine-linux) | `apk update && apk upgrade` |
**IMPORTANT**: Restart Zsh after updating Powerlevel10k. [Do not use `source ~/.zshrc`](
#weird-things-happen-after-typing-source-zshrc).
@@ -802,19 +864,22 @@ The command to update Powerlevel10k depends on how it was installed.
Powerlevel10k. The command to delete them depends on which installation method you'd chosen.
Refer to the [installation instructions](#installation) if you need a reminder.
- | Installation | Uninstall command |
- |---------------------------|------------------------------------------------------------------|
- | [Manual](#manual) | `rm -rf ~/powerlevel10k` |
- | [Oh My Zsh](#oh-my-zsh) | `rm -rf -- ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k` |
- | [Prezto](#prezto) | n/a |
- | [Zim](#zim) | `zimfw uninstall` |
- | [Antigen](#antigen) | `antigen purge romkatv/powerlevel10k` |
- | [Zplug](#zplug) | `zplug clean` |
- | [Zgen](#zgen) | `zgen reset` |
- | [Zplugin](#zplugin) | `zplugin delete romkatv/powerlevel10k` |
- | [Zinit](#zinit) | `zinit delete romkatv/powerlevel10k` |
- | [Homebrew](#homebrew) | `brew uninstall powerlevel10k; brew untap romkatv/powerlevel10k` |
- | [Arch Linux](#arch-linux) | `yay -R --noconfirm zsh-theme-powerlevel10k-git` |
+ | Installation | Uninstall command |
+ |-------------------------------|------------------------------------------------------------------|
+ | [Manual](#manual) | `rm -rf ~/powerlevel10k` |
+ | [Oh My Zsh](#oh-my-zsh) | `rm -rf -- ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k` |
+ | [Prezto](#prezto) | n/a |
+ | [Zim](#zim) | `zimfw uninstall` |
+ | [Antigen](#antigen) | `antigen purge romkatv/powerlevel10k` |
+ | [Antidote](#antidote) | `antidote purge romkatv/powerlevel10k` |
+ | [Zplug](#zplug) | `zplug clean` |
+ | [Zgen](#zgen) | `zgen reset` |
+ | [Zplugin](#zplugin) | `zplugin delete romkatv/powerlevel10k` |
+ | [Zinit](#zinit) | `zinit delete romkatv/powerlevel10k` |
+ | [Zi](#zi) | `zi delete romkatv/powerlevel10k` |
+ | [Homebrew](#homebrew) | `brew uninstall powerlevel10k; brew untap romkatv/powerlevel10k` |
+ | [Arch Linux](#arch-linux) | `yay -R --noconfirm zsh-theme-powerlevel10k-git` |
+ | [Alpine Linux](#alpine-linux) | `apk del zsh-theme-powerlevel10k` |
6. Restart Zsh. [Do not use `source ~/.zshrc`](#weird-things-happen-after-typing-source-zshrc).
7. Delete Powerlevel10k cache files.
```zsh
@@ -1157,8 +1222,8 @@ a relevant tool.
```zsh
# Show prompt segment "kubecontext" only when the command you are typing
-# invokes kubectl, helm, kubens, kubectx, oc, istioctl, kogito, k9s, helmfile, flux, fluxctl or stern.
-typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern'
+# invokes kubectl, helm, kubens, kubectx, oc, istioctl, kogito, k9s, helmfile, flux, fluxctl, stern, kubeseal, or skaffold.
+typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold'
```
Configs created by `p10k configure` may contain parameters of this kind. To customize when different
@@ -1174,7 +1239,7 @@ function kube-toggle() {
if (( ${+POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND} )); then
unset POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND
else
- POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern'
+ POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold'
fi
p10k reload
if zle; then
diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh
index 010459b4..15242372 100644
--- a/config/p10k-classic.zsh
+++ b/config/p10k-classic.zsh
@@ -20,7 +20,7 @@
unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR'
# Zsh >= 5.1 is required.
- autoload -Uz is-at-least && is-at-least 5.1 || return
+ [[ $ZSH_VERSION == (5.<1->*|<6->.*) ]] || return
# The list of segments shown on the left. Fill it with the most important segments.
typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
@@ -65,6 +65,7 @@
luaenv # lua version from luaenv (https://github.com/cehoffman/luaenv)
jenv # java version from jenv (https://github.com/jenv/jenv)
plenv # perl version from plenv (https://github.com/tokuhirom/plenv)
+ perlbrew # perl version from perlbrew (https://github.com/gugod/App-perlbrew)
phpenv # php version from phpenv (https://github.com/phpenv/phpenv)
scalaenv # scala version from scalaenv (https://github.com/scalaenv/scalaenv)
haskell_stack # haskell version from stack (https://haskellstack.org/)
@@ -341,7 +342,7 @@
# typeset -g POWERLEVEL9K_DIR_PREFIX='%248Fin '
#####################################[ vcs: git status ]######################################
- # Branch icon. Set this parameter to '\uF126 ' for the popular Powerline branch icon.
+ # Branch icon. Set this parameter to '\UE0A0 ' for the popular Powerline branch icon.
typeset -g POWERLEVEL9K_VCS_BRANCH_ICON=
# Untracked files icon. It's really a question mark, your font isn't broken.
@@ -1134,6 +1135,16 @@
# Custom icon.
# typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
+ ###########[ perlbrew: perl version from perlbrew (https://github.com/gugod/App-perlbrew) ]############
+ # Perlbrew color.
+ typeset -g POWERLEVEL9K_PERLBREW_FOREGROUND=67
+ # Show perlbrew version only when in a perl project subdirectory.
+ typeset -g POWERLEVEL9K_PERLBREW_PROJECT_ONLY=true
+ # Don't show "perl-" at the front.
+ typeset -g POWERLEVEL9K_PERLBREW_SHOW_PREFIX=false
+ # Custom icon.
+ # typeset -g POWERLEVEL9K_PERLBREW_VISUAL_IDENTIFIER_EXPANSION='⭐'
+
############[ phpenv: php version from phpenv (https://github.com/phpenv/phpenv) ]############
# PHP color.
typeset -g POWERLEVEL9K_PHPENV_FOREGROUND=99
@@ -1216,7 +1227,7 @@
#############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############
# Show kubecontext only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show kubecontext.
- typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern'
+ typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold'
# Kubernetes context classes for the purpose of using different colors, icons and expansions with
# different contexts.
diff --git a/config/p10k-lean-8colors.zsh b/config/p10k-lean-8colors.zsh
index a0e3e5bb..4137f0e2 100644
--- a/config/p10k-lean-8colors.zsh
+++ b/config/p10k-lean-8colors.zsh
@@ -20,7 +20,7 @@
unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR'
# Zsh >= 5.1 is required.
- autoload -Uz is-at-least && is-at-least 5.1 || return
+ [[ $ZSH_VERSION == (5.<1->*|<6->.*) ]] || return
# The list of segments shown on the left. Fill it with the most important segments.
typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
@@ -65,6 +65,7 @@
luaenv # lua version from luaenv (https://github.com/cehoffman/luaenv)
jenv # java version from jenv (https://github.com/jenv/jenv)
plenv # perl version from plenv (https://github.com/tokuhirom/plenv)
+ perlbrew # perl version from perlbrew (https://github.com/gugod/App-perlbrew)
phpenv # php version from phpenv (https://github.com/phpenv/phpenv)
scalaenv # scala version from scalaenv (https://github.com/scalaenv/scalaenv)
haskell_stack # haskell version from stack (https://haskellstack.org/)
@@ -339,7 +340,7 @@
# typeset -g POWERLEVEL9K_DIR_PREFIX='%fin '
#####################################[ vcs: git status ]######################################
- # Branch icon. Set this parameter to '\uF126 ' for the popular Powerline branch icon.
+ # Branch icon. Set this parameter to '\UE0A0 ' for the popular Powerline branch icon.
typeset -g POWERLEVEL9K_VCS_BRANCH_ICON=
# Untracked files icon. It's really a question mark, your font isn't broken.
@@ -486,7 +487,7 @@
# Show status of repositories of these types. You can add svn and/or hg if you are
# using them. If you do, your prompt may become slow even when your current directory
- # isn't in an svn or hg reposotiry.
+ # isn't in an svn or hg repository.
typeset -g POWERLEVEL9K_VCS_BACKENDS=(git)
# These settings are used for repositories other than Git or when gitstatusd fails and
@@ -1115,6 +1116,16 @@
# Custom icon.
# typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
+ ###########[ perlbrew: perl version from perlbrew (https://github.com/gugod/App-perlbrew) ]############
+ # Perlbrew color.
+ typeset -g POWERLEVEL9K_PERLBREW_FOREGROUND=67
+ # Show perlbrew version only when in a perl project subdirectory.
+ typeset -g POWERLEVEL9K_PERLBREW_PROJECT_ONLY=true
+ # Don't show "perl-" at the front.
+ typeset -g POWERLEVEL9K_PERLBREW_SHOW_PREFIX=false
+ # Custom icon.
+ # typeset -g POWERLEVEL9K_PERLBREW_VISUAL_IDENTIFIER_EXPANSION='⭐'
+
############[ phpenv: php version from phpenv (https://github.com/phpenv/phpenv) ]############
# PHP color.
typeset -g POWERLEVEL9K_PHPENV_FOREGROUND=5
@@ -1158,7 +1169,7 @@
#############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############
# Show kubecontext only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show kubecontext.
- typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern'
+ typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold'
# Kubernetes context classes for the purpose of using different colors, icons and expansions with
# different contexts.
diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh
index 4b6519d7..55f9bdd0 100644
--- a/config/p10k-lean.zsh
+++ b/config/p10k-lean.zsh
@@ -20,7 +20,7 @@
unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR'
# Zsh >= 5.1 is required.
- autoload -Uz is-at-least && is-at-least 5.1 || return
+ [[ $ZSH_VERSION == (5.<1->*|<6->.*) ]] || return
# The list of segments shown on the left. Fill it with the most important segments.
typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
@@ -65,6 +65,7 @@
luaenv # lua version from luaenv (https://github.com/cehoffman/luaenv)
jenv # java version from jenv (https://github.com/jenv/jenv)
plenv # perl version from plenv (https://github.com/tokuhirom/plenv)
+ perlbrew # perl version from perlbrew (https://github.com/gugod/App-perlbrew)
phpenv # php version from phpenv (https://github.com/phpenv/phpenv)
scalaenv # scala version from scalaenv (https://github.com/scalaenv/scalaenv)
haskell_stack # haskell version from stack (https://haskellstack.org/)
@@ -335,7 +336,7 @@
# typeset -g POWERLEVEL9K_DIR_PREFIX='%fin '
#####################################[ vcs: git status ]######################################
- # Branch icon. Set this parameter to '\uF126 ' for the popular Powerline branch icon.
+ # Branch icon. Set this parameter to '\UE0A0 ' for the popular Powerline branch icon.
typeset -g POWERLEVEL9K_VCS_BRANCH_ICON=
# Untracked files icon. It's really a question mark, your font isn't broken.
@@ -482,7 +483,7 @@
# Show status of repositories of these types. You can add svn and/or hg if you are
# using them. If you do, your prompt may become slow even when your current directory
- # isn't in an svn or hg reposotiry.
+ # isn't in an svn or hg repository.
typeset -g POWERLEVEL9K_VCS_BACKENDS=(git)
# These settings are used for repositories other than Git or when gitstatusd fails and
@@ -1111,6 +1112,16 @@
# Custom icon.
# typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
+ ###########[ perlbrew: perl version from perlbrew (https://github.com/gugod/App-perlbrew) ]############
+ # Perlbrew color.
+ typeset -g POWERLEVEL9K_PERLBREW_FOREGROUND=67
+ # Show perlbrew version only when in a perl project subdirectory.
+ typeset -g POWERLEVEL9K_PERLBREW_PROJECT_ONLY=true
+ # Don't show "perl-" at the front.
+ typeset -g POWERLEVEL9K_PERLBREW_SHOW_PREFIX=false
+ # Custom icon.
+ # typeset -g POWERLEVEL9K_PERLBREW_VISUAL_IDENTIFIER_EXPANSION='⭐'
+
############[ phpenv: php version from phpenv (https://github.com/phpenv/phpenv) ]############
# PHP color.
typeset -g POWERLEVEL9K_PHPENV_FOREGROUND=99
@@ -1154,7 +1165,7 @@
#############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############
# Show kubecontext only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show kubecontext.
- typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern'
+ typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold'
# Kubernetes context classes for the purpose of using different colors, icons and expansions with
# different contexts.
diff --git a/config/p10k-pure.zsh b/config/p10k-pure.zsh
index 566c030d..97c1a207 100644
--- a/config/p10k-pure.zsh
+++ b/config/p10k-pure.zsh
@@ -29,7 +29,7 @@
unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR'
# Zsh >= 5.1 is required.
- autoload -Uz is-at-least && is-at-least 5.1 || return
+ [[ $ZSH_VERSION == (5.<1->*|<6->.*) ]] || return
# Prompt colors.
local grey=242
diff --git a/config/p10k-rainbow.zsh b/config/p10k-rainbow.zsh
index ed850ba4..a8d2946b 100644
--- a/config/p10k-rainbow.zsh
+++ b/config/p10k-rainbow.zsh
@@ -20,7 +20,7 @@
unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR'
# Zsh >= 5.1 is required.
- autoload -Uz is-at-least && is-at-least 5.1 || return
+ [[ $ZSH_VERSION == (5.<1->*|<6->.*) ]] || return
# The list of segments shown on the left. Fill it with the most important segments.
typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
@@ -65,6 +65,7 @@
luaenv # lua version from luaenv (https://github.com/cehoffman/luaenv)
jenv # java version from jenv (https://github.com/jenv/jenv)
plenv # perl version from plenv (https://github.com/tokuhirom/plenv)
+ perlbrew # perl version from perlbrew (https://github.com/gugod/App-perlbrew)
phpenv # php version from phpenv (https://github.com/phpenv/phpenv)
scalaenv # scala version from scalaenv (https://github.com/scalaenv/scalaenv)
haskell_stack # haskell version from stack (https://haskellstack.org/)
@@ -141,7 +142,7 @@
# Filler between left and right prompt on the first prompt line. You can set it to ' ', '·' or
# '─'. The last two make it easier to see the alignment between left and right prompt and to
# separate prompt from command output. You might want to set POWERLEVEL9K_PROMPT_ADD_NEWLINE=false
- # for more compact prompt if using using this option.
+ # for more compact prompt if using this option.
typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' '
typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_BACKGROUND=
typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_GAP_BACKGROUND=
@@ -344,14 +345,14 @@
# typeset -g POWERLEVEL9K_DIR_PREFIX='in '
#####################################[ vcs: git status ]######################################
- # Version control system colors.
+ # Version control background colors.
typeset -g POWERLEVEL9K_VCS_CLEAN_BACKGROUND=2
typeset -g POWERLEVEL9K_VCS_MODIFIED_BACKGROUND=3
typeset -g POWERLEVEL9K_VCS_UNTRACKED_BACKGROUND=2
typeset -g POWERLEVEL9K_VCS_CONFLICTED_BACKGROUND=3
typeset -g POWERLEVEL9K_VCS_LOADING_BACKGROUND=8
- # Branch icon. Set this parameter to '\uF126 ' for the popular Powerline branch icon.
+ # Branch icon. Set this parameter to '\UE0A0 ' for the popular Powerline branch icon.
typeset -g POWERLEVEL9K_VCS_BRANCH_ICON=
# Untracked files icon. It's really a question mark, your font isn't broken.
@@ -485,7 +486,7 @@
# Show status of repositories of these types. You can add svn and/or hg if you are
# using them. If you do, your prompt may become slow even when your current directory
- # isn't in an svn or hg reposotiry.
+ # isn't in an svn or hg repository.
typeset -g POWERLEVEL9K_VCS_BACKENDS=(git)
##########################[ status: exit code of the last command ]###########################
@@ -1195,6 +1196,16 @@
# Custom icon.
# typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
+ ###########[ perlbrew: perl version from perlbrew (https://github.com/gugod/App-perlbrew) ]############
+ # Perlbrew color.
+ typeset -g POWERLEVEL9K_PERLBREW_FOREGROUND=67
+ # Show perlbrew version only when in a perl project subdirectory.
+ typeset -g POWERLEVEL9K_PERLBREW_PROJECT_ONLY=true
+ # Don't show "perl-" at the front.
+ typeset -g POWERLEVEL9K_PERLBREW_SHOW_PREFIX=false
+ # Custom icon.
+ # typeset -g POWERLEVEL9K_PERLBREW_VISUAL_IDENTIFIER_EXPANSION='⭐'
+
############[ phpenv: php version from phpenv (https://github.com/phpenv/phpenv) ]############
# PHP color.
typeset -g POWERLEVEL9K_PHPENV_FOREGROUND=0
@@ -1287,7 +1298,7 @@
#############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############
# Show kubecontext only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show kubecontext.
- typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern'
+ typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold'
# Kubernetes context classes for the purpose of using different colors, icons and expansions with
# different contexts.
diff --git a/config/p10k-robbyrussell.zsh b/config/p10k-robbyrussell.zsh
index a4cb8b2d..a59e222b 100644
--- a/config/p10k-robbyrussell.zsh
+++ b/config/p10k-robbyrussell.zsh
@@ -24,7 +24,7 @@
unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR'
# Zsh >= 5.1 is required.
- autoload -Uz is-at-least && is-at-least 5.1 || return
+ [[ $ZSH_VERSION == (5.<1->*|<6->.*) ]] || return
# Left prompt segments.
typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(prompt_char dir vcs)
diff --git a/font.md b/font.md
index 964585a9..429af320 100644
--- a/font.md
+++ b/font.md
@@ -52,11 +52,9 @@ If you are using a different terminal, proceed with manual font installation.
*Custom font* under *Text Appearance* and select `MesloLGS NF Regular`.
- **Windows Console Host** (the old thing): Click the icon in the top left corner, then
*Properties → Font* and set *Font* to `MesloLGS NF`.
- - **Windows Terminal** by Microsoft (the new thing): Open `settings.json` (<kbd>Ctrl+Shift+,</kbd>),
- search for `fontFace` and set the value to `MesloLGS NF` for every profile. If you don't find
- `fontFace`, add it under *profiles → defaults*. See [this settings file](
- https://raw.githubusercontent.com/romkatv/dotfiles-public/aba0e6c4657d705ed6c344d700d659977385f25c/dotfiles/microsoft-terminal-settings.json)
- for example.
+ - **Windows Terminal** by Microsoft (the new thing): Open *Settings* (<kbd>Ctrl+,</kbd>), click
+ either on the selected profile under *Profiles* or on *Defaults*, click *Appearance* and set
+ *Font face* to `MesloLGS NF`.
- **IntelliJ** (and other IDEs by Jet Brains): Open *IDE → Edit → Preferences → Editor →
Color Scheme → Console Font*. Select *Use console font instead of the default* and set the font
name to `MesloLGS NF`.
@@ -117,6 +115,36 @@ If you are using a different terminal, proceed with manual font installation.
```
After changing the config run `xrdb ~/.Xresources` to reload it. The new config is applied to
all new terminals.
+ - Crostini (Linux on Chrome OS): Open
+ chrome-untrusted://terminal/html/nassh_preferences_editor.html, set *Text font family* to
+ `'MesloLGS NF'` (including the quotes) and *Custom CSS (inline text)* to the following:
+ ```css
+ @font-face {
+ font-family: "MesloLGS NF";
+ src: url("https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/MesloLGS%20NF%20Regular.ttf");
+ font-weight: normal;
+ font-style: normal;
+ }
+ @font-face {
+ font-family: "MesloLGS NF";
+ src: url("https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/MesloLGS%20NF%20Bold.ttf");
+ font-weight: bold;
+ font-style: normal;
+ }
+ @font-face {
+ font-family: "MesloLGS NF";
+ src: url("https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/MesloLGS%20NF%20Italic.ttf");
+ font-weight: normal;
+ font-style: italic;
+ }
+ @font-face {
+ font-family: "MesloLGS NF";
+ src: url("https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/MesloLGS%20NF%20Bold%20Italic.ttf");
+ font-weight: bold;
+ font-style: italic;
+ }
+ ```
+ **_CAVEAT_**: If you open the normal terminal preferences these settings will be overwritten.
1. Run `p10k configure` to generate a new `~/.p10k.zsh`. The old config may work
incorrectly with the new font.
diff --git a/gitstatus/build b/gitstatus/build
index 05b3abc5..e116abb2 100755
--- a/gitstatus/build
+++ b/gitstatus/build
@@ -100,7 +100,7 @@ if [ -n "$gitstatus_install_tools" ]; then
exit 1
fi
;;
- freebsd)
+ freebsd|dragonfly)
command pkg install -y cmake gmake binutils git perl5 wget
;;
openbsd)
@@ -141,7 +141,7 @@ if [ -n "$gitstatus_install_tools" ]; then
fi
cpus="$(command getconf _NPROCESSORS_ONLN 2>/dev/null)" ||
- cpus="$(command sysctl -n hw.ncpu 2>/dev/null)" ||
+ cpus="$(command sysctl -n hw.ncpu 2>/dev/null)" ||
cpus=8
case "$gitstatus_cpu" in
@@ -174,12 +174,21 @@ if 2>/dev/null "$CC" \
fi
command rm -f -- "$workdir"/cc-test "$workdir"/cc-test.o
-if 2>/dev/null "$CC" \
- -fstack-clash-protection -fcf-protection \
- -Werror \
- -c "$workdir"/cc-test.c \
+if 2>/dev/null "$CC" \
+ -fstack-clash-protection \
+ -Werror \
+ -c "$workdir"/cc-test.c \
-o "$workdir"/cc-test.o; then
- cflags="$cflags -fstack-clash-protection -fcf-protection"
+ cflags="$cflags -fstack-clash-protection"
+fi
+
+command rm -f -- "$workdir"/cc-test "$workdir"/cc-test.o
+if 2>/dev/null "$CC" \
+ -fcf-protection \
+ -Werror \
+ -c "$workdir"/cc-test.c \
+ -o "$workdir"/cc-test.o; then
+ cflags="$cflags -fcf-protection"
fi
command rm -f -- "$workdir"/cc-test "$workdir"/cc-test.o
@@ -224,6 +233,12 @@ case "$gitstatus_kernel" in
gitstatus_ldflags="$gitstatus_ldflags ${static_pie:--static}"
libgit2_cmake_flags="$libgit2_cmake_flags -DENABLE_REPRODUCIBLE_BUILDS=ON"
;;
+ dragonfly)
+ gitstatus_cxx=clang++12
+ gitstatus_make=gmake
+ gitstatus_ldflags="$gitstatus_ldflags ${static_pie:--static}"
+ libgit2_cmake_flags="$libgit2_cmake_flags -DENABLE_REPRODUCIBLE_BUILDS=ON"
+ ;;
openbsd)
gitstatus_cxx=eg++
gitstatus_make=gmake
@@ -574,7 +589,7 @@ case "$gitstatus_kernel" in
fi
fi
;;
- freebsd|openbsd|netbsd|darwin)
+ freebsd|openbsd|netbsd|darwin|dragonfly)
if [ -n "$docker_cmd" ]; then
>&2 echo "[error] docker (-d) is not supported on $gitstatus_kernel"
exit 1
diff --git a/gitstatus/build.info b/gitstatus/build.info
index 6defef24..baa30b07 100644
--- a/gitstatus/build.info
+++ b/gitstatus/build.info
@@ -3,7 +3,7 @@
#
# This value is also read by shell bindings (indirectly, through
# ./install) when using GITSTATUS_DAEMON or usrbin/gitstatusd.
-gitstatus_version="v1.5.3"
+gitstatus_version="v1.5.4"
# libgit2 is a build time dependency of gitstatusd. The values of
# libgit2_version and libgit2_sha256 are read by ./build.
@@ -18,5 +18,5 @@ gitstatus_version="v1.5.3"
#
# If sha256 of ./deps/libgit2-${libgit2_version}.tar.gz doesn't match,
# build gets aborted.
-libgit2_version="tag-5860a42d19bcd226cb6eff2dcbfcbf155d570c73"
-libgit2_sha256="2289203eda19913a2f6d2b26a15384cc43872bffd70e87a7659f9a22da79058e"
+libgit2_version="tag-0ad3d776aa86dd607dc86dcd7f77ad3ed7ebec61"
+libgit2_sha256="c5d0117ae74d3ef244c26f10cce022019077dbc4563e6251fa9f56d36868ce74"
diff --git a/gitstatus/install.info b/gitstatus/install.info
index dab50b9b..45807be4 100644
--- a/gitstatus/install.info
+++ b/gitstatus/install.info
@@ -1,4 +1,4 @@
-# 2
+# 3
#
# This file is used by ./install and indirectly by shell bindings.
#
@@ -8,23 +8,23 @@
# work fine.
# Official gitstatusd binaries.
-uname_s_glob="cygwin_nt-10.0"; uname_m_glob="i686"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.1"; sha256="fe132c412c460c2889d731012d280207fe2b4a3c94d077fb4f1c06ed5d319a42";
+uname_s_glob="cygwin_nt-10.0"; uname_m_glob="i686"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.4"; sha256="5a8a809dcebdb6aa9b47d37e086c0485424a9d9c136770eec3c26cedf5bb75e3";
uname_s_glob="cygwin_nt-10.0"; uname_m_glob="x86_64"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.1"; sha256="c84cade0d6b86e04c27a6055f45851f6b46d6b88ba58772f7ca8ef4d295c800f";
-uname_s_glob="darwin"; uname_m_glob="arm64"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.1"; sha256="ad973948cca4bdcf83b7fcdda70c489a404488ea7304712721f1100b73ec7cbe";
-uname_s_glob="darwin"; uname_m_glob="x86_64"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.1"; sha256="b13455d56cf7b6f07efb7da088057bbc1212847c88b59493918d6f9c0c157160";
-uname_s_glob="freebsd"; uname_m_glob="amd64"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.3"; sha256="73b5622ec9737e93f3fafe117b47ce8de33037be3e2bff283f36668f5852668a";
-uname_s_glob="linux"; uname_m_glob="aarch64"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.1"; sha256="89b87181b2005527a558cdbc32b12b0f15a1a12bb69865ec216ca5a0266a6c4f";
+uname_s_glob="darwin"; uname_m_glob="arm64"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.4"; sha256="eae979e990ca37c56ee39fadd0c3f392cbbd0c6bdfb9a603010be60d9e48910a";
+uname_s_glob="darwin"; uname_m_glob="x86_64"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.4"; sha256="9fd3913ec1b6b856ab6e08a99a2343f0e8e809eb6b62ca4b0963163656c668e6";
+uname_s_glob="freebsd"; uname_m_glob="amd64"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.4"; sha256="8e57ad642251e5acfa430aed82cd4ffe103db0bfadae4a15ccaf462c455d0442";
+uname_s_glob="linux"; uname_m_glob="aarch64"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.4"; sha256="32b57eb28bf6d80b280e4020a0045184f8ca897b20b570c12948aa6838673225";
uname_s_glob="linux"; uname_m_glob="armv6l"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.1"; sha256="4bf5a0d0a082f544a48536ad3675930d5d2cc6a8cf906710045e0788f51192b3";
uname_s_glob="linux"; uname_m_glob="armv7l"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.1"; sha256="2b9deb29f86c8209114b71b94fc2e1ed936a1658808a1bee46f4a82fd6a1f8cc";
-uname_s_glob="linux"; uname_m_glob="armv8l"; file="gitstatusd-${uname_s}-aarch64"; version="v1.5.1"; sha256="89b87181b2005527a558cdbc32b12b0f15a1a12bb69865ec216ca5a0266a6c4f";
-uname_s_glob="linux"; uname_m_glob="i686"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.1"; sha256="4998bf7889f625df71f1da5757915b678e04039cc8cba00ae10950352c7329f9";
-uname_s_glob="linux"; uname_m_glob="ppc64le"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.1"; sha256="e5336dc8e23406c649bafeea83ff17df1726b05ee490f67bae549e55a9a7a7c4";
-uname_s_glob="linux"; uname_m_glob="x86_64"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.1"; sha256="0e8bbc46c17f5cd6e0db98b74c48f4b68f464f98550c8254f6cfcfd936ad1fcf";
+uname_s_glob="linux"; uname_m_glob="armv8l"; file="gitstatusd-${uname_s}-aarch64"; version="v1.5.4"; sha256="32b57eb28bf6d80b280e4020a0045184f8ca897b20b570c12948aa6838673225";
+uname_s_glob="linux"; uname_m_glob="i686"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.4"; sha256="56d55e2e9a202d3072fa612d8fa1faa61243ffc86418a7fa64c2c9d9a82e0f64";
+uname_s_glob="linux"; uname_m_glob="ppc64le"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.4"; sha256="1afd072c8c26ef6ec2d9ac11cef96c84cd6f10e859665a6ffcfb6112c758547e";
+uname_s_glob="linux"; uname_m_glob="x86_64"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.4"; sha256="9633816e7832109e530c9e2532b11a1edae08136d63aa7e40246c0339b7db304";
uname_s_glob="msys_nt-10.0"; uname_m_glob="i686"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.1"; sha256="7f9b849fc52e7a95b9b933e25121ad5ae990a1871aad6616922ad7bcf1eebf20";
uname_s_glob="msys_nt-10.0"; uname_m_glob="x86_64"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.1"; sha256="5d3c626b5ee564dbc13ddba89752dc58b0efe925b26dbd8b2304849d9ba01732";
# Fallbacks to official gitstatusd binaries.
-uname_s_glob="cygwin_nt-*"; uname_m_glob="i686"; file="gitstatusd-cygwin_nt-10.0-${uname_m}"; version="v1.5.1"; sha256="fe132c412c460c2889d731012d280207fe2b4a3c94d077fb4f1c06ed5d319a42";
+uname_s_glob="cygwin_nt-*"; uname_m_glob="i686"; file="gitstatusd-cygwin_nt-10.0-${uname_m}"; version="v1.5.2"; sha256="5a8a809dcebdb6aa9b47d37e086c0485424a9d9c136770eec3c26cedf5bb75e3";
uname_s_glob="cygwin_nt-*"; uname_m_glob="x86_64"; file="gitstatusd-cygwin_nt-10.0-${uname_m}"; version="v1.5.1"; sha256="c84cade0d6b86e04c27a6055f45851f6b46d6b88ba58772f7ca8ef4d295c800f";
uname_s_glob="mingw32_nt-*"; uname_m_glob="i686"; file="gitstatusd-msys_nt-10.0-${uname_m}"; version="v1.5.1"; sha256="7f9b849fc52e7a95b9b933e25121ad5ae990a1871aad6616922ad7bcf1eebf20";
uname_s_glob="mingw32_nt-*"; uname_m_glob="x86_64"; file="gitstatusd-msys_nt-10.0-${uname_m}"; version="v1.5.1"; sha256="5d3c626b5ee564dbc13ddba89752dc58b0efe925b26dbd8b2304849d9ba01732";
diff --git a/gitstatus/mbuild b/gitstatus/mbuild
index ab096e8b..40316fdf 100755
--- a/gitstatus/mbuild
+++ b/gitstatus/mbuild
@@ -94,9 +94,7 @@
setopt no_unset extended_glob pipe_fail prompt_percent typeset_silent \
no_prompt_subst no_prompt_bang pushd_silent warn_create_global
-autoload -Uz is-at-least
-
-if ! is-at-least 5.1 || [[ $ZSH_VERSION == 5.4.* ]]; then
+if [[ $ZSH_VERSION != (5.<1->*|<6->.*) || $ZSH_VERSION == 5.4(|.*) ]]; then
print -ru2 -- "[error] unsupported zsh version: $ZSH_VERSION"
return 1
fi
@@ -184,7 +182,7 @@ function build-unix() {
case $2 in
linux-ppc64le) ;;
linux-*) flags+=(-d docker);;
- darwin-arm64) intro='PATH="/opt/local/bin:$PATH"';;
+ darwin-arm64) intro='PATH="/opt/homebrew/bin:$PATH"';;
darwin-*) intro='PATH="/usr/local/bin:$PATH"';;
esac
ssh $1 -- /bin/sh -uex <<<"
@@ -271,16 +269,52 @@ function build-windows() {
chmod +x $binaries/gitstatusd-$2
}
+if [[ -r /proc/version && "$(</proc/version)" == *Microsoft* ]]; then
+ () {
+ (( $# )) || return 0
+ print -ru2 -- "WARNING: lock files exist: $@"
+ (( $# )) && rm -- $@
+ } $locks/*(N)
+
+ function flock() {
+ local fd
+ sysopen -ro cloexec -u fd <(
+ exec </dev/null 2>/dev/null
+ (
+ trap '' TERM PIPE
+ local fd
+ while true; do
+ sysopen -wo create,excl -u fd -- $1 && break
+ sleep 1
+ done
+ exec {fd}>&-
+ while true; do
+ print || break
+ done
+ rm -- $1
+ ) &!
+ )
+ local REPLY
+ IFS= read -ru $fd
+ }
+else
+ function flock() {
+ : >>$1
+ zsystem flock $1
+ }
+fi
+
function build() (
setopt xtrace
local platform=$1
local machine=$assets[$platform]
- print -n >>$locks/$machine
- zsystem flock $locks/$machine
+ flock $locks/$machine
build-${protocol[(k)$platform]} $machine $platform
local tmp=gitstatusd-$platform.tmp.$$.tar.gz
( cd -q -- $binaries; tar --owner=0 --group=0 -I 'gzip -9' -cf $tmp gitstatusd-$platform )
mv -f -- $binaries/$tmp $binaries/gitstatusd-$platform.tar.gz
+ # Make sure the last command is a built-in (important for flock).
+ :
)
function mbuild() {
@@ -365,4 +399,8 @@ function run-process-tree() {
}
mkdir -p -- $logs $locks $binaries
-run-process-tree mbuild $@
+
+() {
+ run-process-tree mbuild $@
+ exit
+} "$@"
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index 2adbc40f..f9e38f84 100644
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -20,7 +20,7 @@ if [[ $__p9k_sourced != 13 ]]; then
return 1
fi
-if ! autoload -Uz is-at-least || ! is-at-least 5.1; then
+if [[ $ZSH_VERSION != (5.<1->*|<6->.*) ]]; then
() {
>&2 echo -E "You are using ZSH version $ZSH_VERSION. The minimum required version for Powerlevel10k is 5.1."
>&2 echo -E "Type 'echo \$ZSH_VERSION' to see your current zsh version."
@@ -31,8 +31,8 @@ if ! autoload -Uz is-at-least || ! is-at-least 5.1; then
>&2 echo -E "The shell you are currently running is likely $cur."
fi
local other=${${:-zsh}:c}
- if [[ -n $other ]] && $other -c 'autoload -Uz is-at-least && is-at-least 5.1' &>/dev/null; then
- local other_v="$($other -c 'echo -E $ZSH_VERSION' 2>/dev/null)"
+ if [[ -n $other ]] && $other -fc '[[ $ZSH_VERSION == (5.<1->*|<6->.*) ]]' &>/dev/null; then
+ local other_v="$($other -fc 'echo -E $ZSH_VERSION' 2>/dev/null)"
if [[ -n $other_v && $other_v != $ZSH_VERSION ]]; then
>&2 echo -E "You have $other with version $other_v but this is not what you are using."
if [[ -n $def && $def != ${other:A} ]]; then
@@ -341,7 +341,7 @@ function _p9k_human_readable_bytes() {
_p9k__ret=${${_p9k__ret%%0#}%.}$suf
}
-if is-at-least 5.4; then
+if [[ $ZSH_VERSION == (5.<4->*|<6->.*) ]]; then
function _p9k_print_params() { typeset -p -- "$@" }
else
# Cannot use `typeset -p` unconditionally because of bugs in zsh.
@@ -1349,7 +1349,7 @@ _p9k_prompt_battery_init() {
return
fi
if [[ $_p9k_os != (Linux|Android) ||
- -z /sys/class/power_supply/(CMB*|BAT*|battery)/(energy_full|charge_full|charge_counter)(#qN) ]]; then
+ -z /sys/class/power_supply/(CMB*|BAT*|*battery)/(energy_full|charge_full|charge_counter)(#qN) ]]; then
typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='${:-}'
fi
}
@@ -1407,7 +1407,7 @@ _p9k_prompt_battery_set_args() {
Linux|Android)
# See https://sourceforge.net/projects/acpiclient.
- local -a bats=( /sys/class/power_supply/(CMB*|BAT*|battery)/(FN) )
+ local -a bats=( /sys/class/power_supply/(CMB*|BAT*|*battery)/(FN) )
(( $#bats )) || return
local -i energy_now energy_full power_now
@@ -3116,6 +3116,25 @@ _p9k_prompt_plenv_init() {
}
################################################################
+# Segment to display perlbrew information
+# https://github.com/gugod/App-perlbrew
+
+prompt_perlbrew() {
+ if (( _POWERLEVEL9K_PERLBREW_PROJECT_ONLY )); then
+ _p9k_upglob 'cpanfile|.perltidyrc|(|MY)META.(yml|json)|(Makefile|Build).PL|*.(pl|pm|t|pod)' && return
+ fi
+
+ local v=$PERLBREW_PERL
+ (( _POWERLEVEL9K_PERLBREW_SHOW_PREFIX )) || v=${v#*-}
+ [[ -n $v ]] || return
+ _p9k_prompt_segment "$0" "blue" "$_p9k_color1" 'PERL_ICON' 0 '' "${v//\%/%%}"
+}
+
+_p9k_prompt_perlbrew_init() {
+ typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='$PERLBREW_PERL'
+}
+
+################################################################
# Segment to display chruby information
# see https://github.com/postmodern/chruby/issues/245 for chruby_auto issue with ZSH
prompt_chruby() {
@@ -4464,7 +4483,7 @@ prompt_kubecontext() {
{
(( pos <= $#cfg )) || return
shift $pos cfg
- pos=${cfg[(i) name: $name]}
+ pos=${cfg[(i) name: ${(b)name}]}
(( pos <= $#cfg )) || return
(( --pos ))
for ((; pos > 0; --pos)); do
@@ -4628,9 +4647,9 @@ _p9k_gcloud_prefetch() {
# P9K_GCLOUD_PROJECT is deprecated; it's always equal to P9K_GCLOUD_PROJECT_ID
unset P9K_GCLOUD_CONFIGURATION P9K_GCLOUD_ACCOUNT P9K_GCLOUD_PROJECT P9K_GCLOUD_PROJECT_ID P9K_GCLOUD_PROJECT_NAME
(( $+commands[gcloud] )) || return
- _p9k_read_word ~/.config/gcloud/active_config || return
+ _p9k_read_word ${CLOUDSDK_CONFIG:-~/.config/gcloud}/active_config || return
P9K_GCLOUD_CONFIGURATION=$_p9k__ret
- if ! _p9k_cache_stat_get $0 ~/.config/gcloud/configurations/config_$P9K_GCLOUD_CONFIGURATION; then
+ if ! _p9k_cache_stat_get $0 ${CLOUDSDK_CONFIG:-~/.config/gcloud}/configurations/config_$P9K_GCLOUD_CONFIGURATION; then
local pair account project_id
pair="$(gcloud config configurations describe $P9K_GCLOUD_CONFIGURATION \
--format=$'value[separator="\1"](properties.core.account,properties.core.project)')"
@@ -4988,18 +5007,18 @@ _p9k_prompt_proxy_init() {
function prompt_direnv() {
local -i len=$#_p9k__prompt _p9k__has_upglob
- _p9k_prompt_segment $0 $_p9k_color1 yellow DIRENV_ICON 0 '$DIRENV_DIR' ''
+ _p9k_prompt_segment $0 $_p9k_color1 yellow DIRENV_ICON 0 '${DIRENV_DIR-}' ''
(( _p9k__has_upglob )) || typeset -g "_p9k__segment_val_${_p9k__prompt_side}[_p9k__segment_index]"=$_p9k__prompt[len+1,-1]
}
_p9k_prompt_direnv_init() {
# DIRENV_DIR is set in a precmd hook. If our hook isn't the last, DIRENV_DIR might
# still get set before prompt is expanded.
- typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='${DIRENV_DIR:-${precmd_functions[-1]:#_p9k_precmd}}'
+ typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='${DIRENV_DIR-${precmd_functions[-1]:#_p9k_precmd}}'
}
function instant_prompt_direnv() {
- if [[ -n $DIRENV_DIR && $precmd_functions[-1] == _p9k_precmd ]]; then
+ if [[ -n ${DIRENV_DIR:-} && $precmd_functions[-1] == _p9k_precmd ]]; then
_p9k_prompt_segment prompt_direnv $_p9k_color1 yellow DIRENV_ICON 0 '' ''
fi
}
@@ -5997,7 +6016,7 @@ _p9k_set_instant_prompt() {
[[ -n $RPROMPT ]] || unset RPROMPT
}
-typeset -gri __p9k_instant_prompt_version=45
+typeset -gri __p9k_instant_prompt_version=47
_p9k_dump_instant_prompt() {
local user=${(%):-%n}
@@ -6031,7 +6050,7 @@ _p9k_dump_instant_prompt() {
typeset -gi __p9k_instant_prompt_disabled=1
[[ \$ZSH_VERSION == ${(q)ZSH_VERSION} && \$ZSH_PATCHLEVEL == ${(q)ZSH_PATCHLEVEL} &&
$screen \${(M)TERM:#(screen*|tmux*)} &&
- \${#\${(M)VTE_VERSION:#(<1-4602>|4801)}} == ${#${(M)VTE_VERSION:#(<1-4602>|4801)}} &&
+ \${#\${(M)VTE_VERSION:#(<1-4602>|4801)}} == "${#${(M)VTE_VERSION:#(<1-4602>|4801)}}" &&
\$POWERLEVEL9K_DISABLE_INSTANT_PROMPT != 'true' &&
\$POWERLEVEL9K_INSTANT_PROMPT != 'off' ]] || return
typeset -g __p9k_instant_prompt_param_sig=${(q+)_p9k__param_sig}
@@ -6533,7 +6552,9 @@ function _p9k_clear_instant_prompt() {
unset _z4h_saved_screen
fi
print -rn -- $terminfo[rc]${(%):-%b%k%f%s%u}$terminfo[ed]
- local unexpected=${${${(S)content//$'\e[?'<->'c'}//$'\e['<->' q'}//$'\e'[^$'\a\e']#($'\a'|$'\e\\')}
+ local unexpected=${(S)${${content//$'\e[?'<->'c'}//$'\e['<->' q'}//$'\e'[^$'\a\e']#($'\a'|$'\e\\')}
+ # Visual Studio Code prints this garbage.
+ unexpected=${unexpected//$'\033[1;32mShell integration activated\033[0m\n'}
if [[ -n $unexpected ]]; then
local omz1='[Oh My Zsh] Would you like to update? [Y/n]: '
local omz2='Updating Oh My Zsh'
@@ -6995,7 +7016,7 @@ function _p9k_reset_prompt() {
zle .reset-prompt
(( ${+functions[z4h]} )) || zle -R
} always {
- (( _p9k__can_hide_cursor )) && echoti cnorm
+ (( _p9k__can_hide_cursor )) && print -rn -- $_p9k__cnorm
_p9k__cursor_hidden=0
}
fi
@@ -7007,14 +7028,14 @@ function _p9k_reset_prompt() {
# ZSH_PATCHLEVEL=zsh-5.4.2-159-gd8d9fee13. Released in 5.5.
#
# Fix: https://github.com/zsh-users/zsh/commit/64d13738357c9b9c212adbe17f271716abbcf6ea.
-# ZSH_PATCHLEVEL=zsh-5.7.1-50-g64d137383.
+# ZSH_PATCHLEVEL=zsh-5.7.1-50-g64d137383. Released in 5.7.2.
#
# Test: PROMPT="${(pl:$((COLUMNS))::-:)}<%1(l.%2(l.FAIL.PASS).FAIL)> " zsh -dfis <<<exit
# Workaround: PROMPT="${(pl:$((COLUMNS))::-:)}%{%G%}<%1(l.%2(l.FAIL.PASS).FAIL)> " zsh -dfis <<<exit
function _p9k_prompt_overflow_bug() {
[[ $ZSH_PATCHLEVEL =~ '^zsh-5\.4\.2-([0-9]+)-' ]] && return $(( match[1] < 159 ))
[[ $ZSH_PATCHLEVEL =~ '^zsh-5\.7\.1-([0-9]+)-' ]] && return $(( match[1] >= 50 ))
- is-at-least 5.5 && ! is-at-least 5.7.2
+ [[ $ZSH_VERSION == 5.<5-7>* && $ZSH_VERSION != 5.7.<2->* ]]
}
typeset -g _p9k__param_pat
@@ -7117,6 +7138,14 @@ _p9k_init_vars() {
typeset -gi _p9k__restore_prompt_fd
typeset -gi _p9k__redraw_fd
typeset -gi _p9k__can_hide_cursor=$(( $+terminfo[civis] && $+terminfo[cnorm] ))
+ if (( _p9k__can_hide_cursor )); then
+ # See https://github.com/romkatv/powerlevel10k/issues/1699
+ if [[ $terminfo[cnorm] == *$'\e[?25h'(|'\e'*) ]]; then
+ typeset -g _p9k__cnorm=$'\e[?25h'
+ else
+ typeset -g _p9k__cnorm=$terminfo[cnorm]
+ fi
+ fi
typeset -gi _p9k__cursor_hidden
typeset -gi _p9k__non_hermetic_expansion
typeset -g _p9k__time
@@ -7448,6 +7477,8 @@ _p9k_init_params() {
_p9k_declare -b POWERLEVEL9K_DOTNET_VERSION_PROJECT_ONLY 1
_p9k_declare -b POWERLEVEL9K_GO_VERSION_PROJECT_ONLY 1
_p9k_declare -b POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY 1
+ _p9k_declare -b POWERLEVEL9K_PERLBREW_PROJECT_ONLY 1
+ _p9k_declare -b POWERLEVEL9K_PERLBREW_SHOW_PREFIX 0
_p9k_declare -b POWERLEVEL9K_JAVA_VERSION_PROJECT_ONLY 0
_p9k_declare -b POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW 0
_p9k_declare -a POWERLEVEL9K_NODENV_SOURCES -- shell local global
@@ -7631,7 +7662,7 @@ function _p9k_on_widget_zle-keymap-select() { _p9k_check_visual_mode; __p9k_rese
function _p9k_on_widget_overwrite-mode() { _p9k_check_visual_mode; __p9k_reset_state=2; }
function _p9k_on_widget_vi-replace() { _p9k_check_visual_mode; __p9k_reset_state=2; }
-if is-at-least 5.3; then
+if [[ $ZSH_VERSION == (5.<3->*|<6->.*) ]]; then
function _p9k_check_visual_mode() {
[[ ${KEYMAP:-} == vicmd ]] || return 0
local region=${${REGION_ACTIVE:-0}/2/1}
@@ -7650,7 +7681,7 @@ function _p9k_on_widget_deactivate-region() { _p9k_check_visual_mode; }
function _p9k_on_widget_zle-line-init() {
(( _p9k__cursor_hidden )) || return 0
_p9k__cursor_hidden=0
- echoti cnorm
+ print -rn -- $_p9k__cnorm
}
function _p9k_on_widget_zle-line-finish() {
@@ -7808,7 +7839,7 @@ function _p9k_wrap_widgets() {
typeset -gir __p9k_widgets_wrapped=1
local -a widget_list
- if is-at-least 5.3; then
+ if [[ $ZSH_VERSION == (5.<3->*|<6->.*) ]]; then
local -aU widget_list=(
zle-line-pre-redraw
zle-line-init
@@ -8154,7 +8185,7 @@ _p9k_init_prompt() {
_p9k_all_params_eq '_POWERLEVEL9K_*WHITESPACE_BETWEEN_RIGHT_SEGMENTS' ' ' &&
_p9k_all_params_eq '_POWERLEVEL9K_*RIGHT_RIGHT_WHITESPACE' ' ' &&
_p9k_all_params_eq '_POWERLEVEL9K_*RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL' '' &&
- ! is-at-least 5.7.2; then
+ [[ $ZSH_VERSION != (5.7.<2->*|5.<8->*|<6->.*) ]]; then
_p9k_emulate_zero_rprompt_indent=1
_p9k_prompt_prefix_left+='${${:-${_p9k__real_zle_rprompt_indent:=$ZLE_RPROMPT_INDENT}${ZLE_RPROMPT_INDENT::=1}${_p9k__ind::=0}}+}'
_p9k_line_suffix_right[-1]='${_p9k__sss:+${_p9k__sss% }%E}}'
@@ -8274,9 +8305,10 @@ _p9k_init_toolbox() {
local name=(${(Q)${${(@M)${(f)"$(</run/.containerenv)"}:#name=*}#name=}})
[[ ${#name} -eq 1 && -n ${name[1]} ]] || return 0
typeset -g P9K_TOOLBOX_NAME=${name[1]}
- elif [[ -n $DISTROBOX_ENTER_PATH && -n $NAME ]]; then
+ elif [[ -n $DISTROBOX_ENTER_PATH ]]; then
local name=${(%):-%m}
- if [[ $name == $NAME* ]]; then
+ # $NAME can be empty, see https://github.com/romkatv/powerlevel10k/pull/1916.
+ if [[ -n $name && $name == $NAME* ]]; then
typeset -g P9K_TOOLBOX_NAME=$name
fi
fi
@@ -8291,7 +8323,7 @@ _p9k_must_init() {
[[ $sig == $_p9k__param_sig ]] && return 1
_p9k_deinit
fi
- _p9k__param_pat=$'v134\1'${(q)ZSH_VERSION}$'\1'${(q)ZSH_PATCHLEVEL}$'\1'
+ _p9k__param_pat=$'v136\1'${(q)ZSH_VERSION}$'\1'${(q)ZSH_PATCHLEVEL}$'\1'
_p9k__param_pat+=$__p9k_force_term_shell_integration$'\1'
_p9k__param_pat+=$'${#parameters[(I)POWERLEVEL9K_*]}\1${(%):-%n%#}\1$GITSTATUS_LOG_LEVEL\1'
_p9k__param_pat+=$'$GITSTATUS_ENABLE_LOGGING\1$GITSTATUS_DAEMON\1$GITSTATUS_NUM_THREADS\1'
@@ -8824,7 +8856,7 @@ typeset -gi __p9k_configured=0
typeset -gri __p9k_instant_prompt_disabled=1
# `typeset -g` doesn't roundtrip in zsh prior to 5.4.
-if is-at-least 5.4; then
+if [[ $ZSH_VERSION == (5.<4->*|<6->.*) ]]; then
typeset -gri __p9k_dumps_enabled=1
else
typeset -gri __p9k_dumps_enabled=0
@@ -9236,6 +9268,8 @@ if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file && -n $__p9k_instant_p
zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null
fi
+unset VSCODE_SHELL_INTEGRATION
+
_p9k_init_ssh
_p9k_init_toolbox
prompt_powerlevel9k_setup
diff --git a/internal/wizard.zsh b/internal/wizard.zsh
index 5d6215a7..64695f1a 100644
--- a/internal/wizard.zsh
+++ b/internal/wizard.zsh
@@ -222,7 +222,12 @@ function hide_cursor() {
}
function show_cursor() {
- echoti cnorm 2>/dev/null
+ local cnorm=${terminfo[cnorm]-}
+ if [[ $cnorm == *$'\e[?25h'(|'\e'*) ]]; then
+ print -n '\e[?25h'
+ else
+ print -n $cnorm
+ fi
}
function consume_input() {
@@ -1444,7 +1449,7 @@ function print_instant_prompt_link() {
}
function ask_instant_prompt() {
- if ! is-at-least 5.4; then
+ if [[ $ZSH_VERSION != (5.<4->*|<6->.*) ]]; then
instant_prompt=off
options+=instant_prompt=auto-off
return 0
@@ -2003,9 +2008,8 @@ else
fi
zmodload zsh/terminfo || return
-autoload -Uz is-at-least || return
-if is-at-least 5.7.1 && [[ $COLORTERM == (24bit|truecolor) ]]; then
+if [[ $ZSH_VERSION == (5.7.<1->*|5.<8->*|<6->.*) && $COLORTERM == (24bit|truecolor) ]]; then
local -ir has_truecolor=1
else
local -ir has_truecolor=0