Generally, new features will be introduced as a component to improve performance and compatibility and not to
force, but to allow the user decide and
choose the features. Let us know what should be improved and
maintained with a ⭐ on features you like and use:
Join
the Z-Shell organization to collaborate and create or add your
plugins and features.
💞 Contributing
Contributions are what make the open-source community such an amazing place to learn, inspire, and create.
Any contributions you make will benefit everybody else and greatly appreciated and our
target support each other.
If you want to say thank you or/and support the active development, add a GitHub Star to the project, and follow the
Z-Shell organization.
Write interesting articles about the project on:
Dev.to, Medium.com,
Hacker News,
Reddit, Twitter, or your blog.
Participate in the community by showing interest
in the project, as it may bring us together, then great things may happen. If you want but are not confident
about participating - do not hesitate to contact us so we can discuss the situation 👍.
🛡️ Security
- Z-Shell Zi follows good practices of security, but 100% security cannot be assured.
- Z-Shell Zi is provided "as is" without any warranty. Use at your
own risk.
- For more information and to report security issues, please refer to our
security
documentation.
ℹ️ Acknowledgements
The Z-Shell organization was created to recover the
Zdharma organization which was deleted by the owner for an unknown
reason. It took a lot of time and effort for all those who liked the project and were depending on it don't
want to depend on an unreliable source.
Zi
, formerly known as zplugin, zinit, is an open-source
community project released under the
MIT License.
🥇 Authors & contributors
Check the list of authors and contributors in this
repository and all other repositories under the
Z-Shell organization. We will include
all showing interest or dedicating their time to taking part.
Treat ZI[MAN_DIR] as default for manpages instead of previously used: $ZPFX/man, ensure the directory is available in manpath when the variable is changed.
Many functions, messages, and general visual appearance is not working, are incorrect, or are just deprecated. It also hurts the performance or simply not working. There are many tools and services that can be shared with contributors when required as most are related to ZI and Z shell in general.
Currently there zi cd <plugin> which changes to the directory where the plugin is installed. Getting the info of where the plugin is will be very useful
If the feature request is approved, would you be willing to submit a PR? (Help can be provided if you need assistance submitting a PR)
-- console output produced during zsh initialization follows --
Downloading: molovo… (at label: molovo…)
Cloning into '/Users/gawainx/.zi/plugins/molovo'...
remote: Not Found
fatal: repository 'https://github.com/molovo/' not found
Clone failed (code: 128).
Current behavior
Every time I start a new zsh, e.g., new Tab, or type zsh in shell
Steps to reproduce
Start a new zsh instance.
Code snippet
My .zshrc is following:
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.# Initialization code that may require console input (password prompts, [y/n]# confirmations, etc.) must go above this block; everything else may go below.export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890
if [[ -r"${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]];thensource"${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"fi# >>> conda initialize >>># !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/gawainx/opt/miniconda3/bin/conda''shell.zsh''hook'2> /dev/null)"if [ $?-eq 0 ];theneval"$__conda_setup"elseif [ -f"/Users/gawainx/opt/miniconda3/etc/profile.d/conda.sh" ];then."/Users/gawainx/opt/miniconda3/etc/profile.d/conda.sh"elseexport PATH="/Users/gawainx/opt/miniconda3/bin:$PATH"fifiunset __conda_setup
# <<< conda initialize <<<if [[ !-f$HOME/.zi/bin/zi.zsh ]];then
print -P "%F{33}▓▒░ %F{160}Installing (%F{33}z-shell/zi%F{160})…%f"command mkdir -p "$HOME/.zi"&&command chmod g-rwX "$HOME/.zi"command git clone -q --depth=1 --branch "main" https://github.com/z-shell/zi "$HOME/.zi/bin"&& \
print -P "%F{33}▓▒░ %F{34}Installation successful.%f%b"|| \
print -P "%F{160}▓▒░ The clone has failed.%f%b"fisource"$HOME/.zi/bin/zi.zsh"
autoload -Uz _zi
((${+_comps}))&& _comps[zi]=_zi
# configure zsh auto-comp and more# Load OMZ Git library
zi snippet OMZL::git.zsh
# Load Git plugin from OMZ
zi snippet OMZP::git
zi cdclear -q # <- forget completions provided up to this moment
setopt promptsubst
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}''r:|[._-]=* r:|=*''l:|=* r:|=*'# auto-suggest
zi ice wait lucid atinit"ZI[COMPINIT_OPTS]=-C; zpcompinit; zpcdreplay"
zi light z-shell/F-Sy-H
zi ice wait lucid atload"!_zsh_autosuggest_start"
zi load zsh-users/zsh-autosuggestions
# examples here -> https://z-shell.pages.dev/docs/gallery/collection
zicompinit # <- https://z-shell.pages.dev/docs/gallery/collection#minimal
zi light-mode for \
z-shell/z-a-meta-plugins \
@annexes @molovo
# Load prompt if terminal has least 256 colors.if [ "${TERM##*-}"='256color' ] || [ "${terminfo[colors]:?}"-gt 255 ];then
zi ice depth=1; zi light romkatv/powerlevel10k
fi# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ !-f~/.p10k.zsh ]] ||source~/.p10k.zsh
# aliasalias ls='ls -aG'alias ll='ls -l'alias l='ls'code () { VSCODE_CWD="$PWD" open -n -b "com.microsoft.VSCode" --args $PWD/$*;}
conda activate dev
Aditional information
Nope
Self-service
I'd be willing to address this documentation request myself.
Using zi ice svn with the OMZP:: should pull the whole folder
Current behavior
It fails to load with a Snippet not loaded but it seems to have loaded something
Steps to reproduce
Try to load like this :
zi ice svn
zi snippet OMZP::history-substring-search # Tested only with HSS
Code snippet
zi ice svn
#zi snippet OMZ::/plugins/history-substring-search # This form works
zi snippet OMZP::history-substring-search
Aditional information
zi status --all without OMZP::
Status for plugins/history-substring-search
6455 6205 marc.cornell. history-substring-search.plugin.zsh
? history-substring-search.plugin.zsh.zwc
6455 5342 marc.cornell. update-from-upstream.zsh
6455 6130 marc.cornell. history-substring-search.zsh
? history-substring-search.zsh.zwc
6455 5885 marc.cornell. README.md
? ._zi
6455 6205 marc.cornell. .
Status against revision: 6455
ls $HOME/.zi/snippets/OMZP::history-substring-searchwithOMZP:: (after zi delete --clean)
drwxr-xr-x 3 signed users 4.0K May 28 10:01 history-substring-search.zsh
-rw-r--r-- 1 signed users 638 May 28 10:01 OMZP::history-substring-search
-r--r--r-- 1 signed users 1.4K May 28 10:01 OMZP::history-substring-search.zwc
drwxr-xr-x 2 signed users 4.0K May 28 10:01 ._zi
(no sign of svn with OMZP)
Self-service
I'd be willing to address this documentation request myself.
I think that we can use GNU Gettext with Crowdin for mangaging translations. We can add an gh-action which will pull translations from crowdin and push them into the repo in i18n/ or locales/. In ZI, we will use gettext each time there is an output.
zi ice as"command" from"gh-r" mv"fd* fd" sbin"**/fd(.exe|) -> fd"
zi light @sharkdp/fd
OUT:
Downloading sharkdp/fd…
(Requesting `fd_8.3.1_arm64.deb'…)######################################################################## 100.0% ziextract: Unpacking the files from: `fd_8.3.1_arm64.deb'…ziextract: Successfully extracted and assigned +x chmod to the file: `usr/bin/fd'.bin-gem-node annex: Created the fd shim and set +x on the fd binarybin-gem-node annex: Created the fd shim and set +x on the fd binaryInstalled 0 completions. They are stored in $INSTALLED_COMPS array.Skipped installing 1 completions. They are stored in $SKIPPED_COMPS array.
IN:
zi ice as"command" from"gh-r" mv"bat* bat" sbin"**/bat(.exe|) -> bat"
zi light @sharkdp/bat
OUT:
Downloading sharkdp/bat…
(Requesting `bat_0.19.0_arm64.deb'…)######################################################################## 100.0% ziextract: Unpacking the files from: `bat_0.19.0_arm64.deb'…ziextract: Successfully extracted and assigned +x chmod to the file: `usr/bin/bat'.bin-gem-node annex: Created the bat shim and set +x on the bat binarybin-gem-node annex: Created the bat shim and set +x on the bat binaryInstalled 0 completions. They are stored in $INSTALLED_COMPS array.Skipped installing 1 completions. They are stored in $SKIPPED_COMPS array.
IN:
zi ice as"command" from"gh-r" mv"hyperfine* hyperfine" sbin"**/hyperfine(.exe|) -> hyperfine"
zi light @sharkdp/hyperfine
OUT:
Downloading sharkdp/hyperfine…
(Requesting `hyperfine_1.12.0_arm64.deb'…)######################################################################## 100.0% ziextract: Unpacking the files from: `hyperfine_1.12.0_arm64.deb'…ziextract: Successfully extracted and assigned +x chmod to the file: `usr/bin/hyperfine'.bin-gem-node annex: Created the hyperfine shim and set +x on the hyperfine binarybin-gem-node annex: Created the hyperfine shim and set +x on the hyperfine binaryInstalled 0 completions. They are stored in $INSTALLED_COMPS array.Skipped installing 1 completions. They are stored in $SKIPPED_COMPS array.
Code snippet
The issue is that instead of setting shim to the bin/..., it is set to the completion:
#!/usr/bin/env zshfunctionfd {
local bindir="/home/who-me?/.zi/plugins/sharkdp---fd/usr/share/bash-completion/completions"local -xU PATH="$bindir":"$PATH""$bindir"/"fd""$@"
}
fd "$@"
But same command call and same dir structure, hexyl installed correctly.
zi ice as"command" from"gh-r" mv"hexyl* hexyl" sbin"**/hexyl(.exe|) -> hexyl"
zi light @sharkdp/hexyl
For Linux could be fixed:
zi ice as"command" from"gh-r" mv"bat* bat" sbin"**/bin/bat(.exe|) -> bat"
zi light @sharkdp/bat
However, need a closer look to pin when and why it happens as only arm devices are affected.
if [[ ${${:-=less}:A:t}= busybox* ]] {
more 2>/dev/null
((${+commands[more]}))
} else {
less -FRXi 2>/dev/null
((${+commands[less]}))
}
Code snippet
if [[ -r "/home/wicoop/.config/zi/init.zsh" ]]; then
source "/home/wicoop/.config/zi/init.zsh" && zzinit
fi
zi light-mode for z-shell/z-a-meta-plugins @Annexes@console-tools @zsh-users+fast @ext-git
zi light-mode for OMZL::git.zsh
OMZL::compfix.zsh OMZL::prompt_info_functions.zsh
OMZL::spectrum.zsh OMZL::clipboard.zsh OMZL::functions.zsh
OMZL::completion.zsh OMZL::termsupport.zsh OMZL::directories.zsh
zi snippet OMZP::ssh-agent
zi snippet OMZP::gpg-agent
zi light-mode for @romkatv
Aditional information
.zi-pager:7: less not found
Updating wfxr/forgit
.zi-pager:7: less not found
Updating z-shell/F-Sy-H
.zi-pager:7: less not found
Updating z-shell/z-a-bin-gem-node
.zi-pager:7: less not found
Updating z-shell/z-a-meta-plugins
.zi-pager:7: less not found
Updating z-shell/z-a-patch-dl
.zi-pager:7: less not found
Updating z-shell/z-a-readurl
.zi-pager:7: less not found
Updating z-shell/z-a-rust
.zi-pager:7: less not found
Updating z-shell/z-a-submods
.zi-pager:7: less not found
Updating z-shell/z-a-unscope
.zi-pager:7: less not found
Updating zsh-users/zsh-autosuggestions
.zi-pager:7: less not found
Updating zsh-users/zsh-completions
.zi-pager:7: less not found
Zi Profiles allow easy switch of zsh configurations. For example, if then developer tools are required simply by issuing a command would swap to the defined configuration and vice versa. Profiles can be used from the ZI repository or custom.
If the feature request is approved, would you be willing to submit a PR? (Help can be provided if you need assistance submitting a PR)
print [ -abcDilmnNoOpPrsSz ] [ -u n ] [ -f format ] [ -C cols ] [ -v name ] [ -xX tabstop ] [ -R [ -en ]] [ arg ... ]
With the ‘-f’ option the arguments are printed as described by printf. With no flags or with the flag ‘-’, the arguments are printed on the standard output as described by echo, with the following differences: the escape sequence ‘\M-x’ (or ‘\Mx’) metafies the character x (sets the highest bit), ‘\C-x’ (or ‘\Cx’) produces a control character (‘\C-@’ and ‘\C-?’ give the characters NULL and delete), a character code in octal is represented by ‘\NNN’ (instead of ‘\0NNN’), and ‘\E’ is a synonym for‘\e’. Finally, if notin an escape sequence, ‘\’ escapes the following character and is not printed.
-a
Print arguments with the column incrementing first. Only useful with the -c and -C options.
-b
Recognize all the escape sequences defined for the bindkey command, see Zle Builtins.
-c
Print the arguments in columns. Unless -a is also given, arguments are printed with the row incrementing first.
-C cols
Print the arguments in cols columns. Unless -a is also given, arguments are printed with the row incrementing first.
-D
Treat the arguments as paths, replacing directory prefixes with ~ expressions corresponding to directory names, as appropriate.
-i
If given together with -o or -O, sorting is performed case-independently.
-l
Print the arguments separated by newlines instead of spaces.
-m
Take the first argument as a pattern (should be quoted), and remove it from the argument list together with subsequent arguments that do not match this pattern.
-n
Do not add a new line to the output.
-N
Print the arguments separated and terminated by nulls.
-o
Print the arguments sorted in ascending order.
-O
Print the arguments sorted in descending order.
-p
Print the arguments to the input of the coprocess.
-P
Perform prompt expansion (see Prompt Expansion). In combination with ‘-f’, prompt escape sequences are parsed only within interpolated arguments, not within the format string.
-r
Ignore the escape conventions of echo.
-R
Emulate the BSD echo command, which does not process escape sequences unless the flag is given. The -n flag suppresses the trailing newline. Only thee and -n flags are recognized after -R; all other arguments and options are printed.
-s
Place the results in the history list instead of on the standard output. Each argument to the print command is treated as a single word in history, regardless of its content.
-S
Place the results in the history list instead of on the standard output. In this case, only a single argument is allowed; it will be split into words as if it were a full shell command line. The effect is similar to reading the line from a history file with the HIST_LEX_WORDS option active.
-u n
Print the arguments to file descriptor n.
-v name
Store the printed arguments as the value of the parameter name.
-x tab-stop
Expand leading tabs on each line of output in the printed string assuming a tab stops every tab-stop character. This is appropriate for formatting code that may be indented with tabs. Note that leading tabs of any argument to print, not just the first, are expanded, even if the print is using spaces to separate arguments (the column count is maintained across arguments but may be incorrect on output owing to previous unexpanded tabs).
The start of the output of each print command is assumed to be aligned with a tab stop. Widths of multibyte characters are handled if the option MULTIBYTE is in effect. This option is ignored if other formatting options are in effect, namely column alignment or printf style, or if the output is to a special location such as shell history or the command-line editor.
-X tab-stop
This is similar to -x, except that all tabs in the printed string are expanded. This is appropriate if tabs in the arguments are being used to produce a table format.
-z
Push the arguments onto the editing buffer stack, separated by spaces.
If any of ‘-m’, ‘-o’ or ‘-O’ are used in combination with ‘-f’ and there are no arguments (after the removal process in the case of ‘-m’) then nothing is printed.
#64 - Finished ziextract test which passed, however, some parts could be improved, as some distros don't have file installed by default which makes ziextract fail without providing correct error code while all other informs about failed failures correctly.
When starting zsh, never finishes and prompt is not shown unless aborted. I run zsh -i -x -c exit and then press Ctrl+C to abort it seems to stuck here
You can find my config and sources aliases etc. [here][https://github.com/papanito/dot-files/tree/0dde680e4e7da40e976795ee5d3b52d781abb843/personal/shell). This .zshrc is not working.
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block, everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# Created by newuser for 5.2
# The following lines were added by compinstall
zstyle ':completion:*' auto-description 'specify: %d'
zstyle ':completion:*' completer _expand _complete _correct _approximate
zstyle ':completion:*' format 'Completing %d'
zstyle ':completion:*' group-name ''
zstyle ':completion:*' menu select=2
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion:*' list-colors ''
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=* l:|=*'
zstyle ':completion:*' menu select=long
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
zstyle ':completion:*' use-compctl false
zstyle ':completion:*' verbose true
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
autoload -Uz compinit
compinit
# End of lines added by compinstall
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
setopt appendhistory autocd extendedglob notify hist_ignore_all_dups hist_ignore_space
bindkey -e
# End of lines configured by zsh-newuser-install
ZSH_DOTENV_FILE=.dotenv
if [ -f ~/.aliases ]; then . ~/.aliases ; fi
if [ -f ~/.functions ]; then . ~/.functions ; fi
if [ -f ~/.azure_completion ]; then . ~/.azure_completion ; fi
autoload -U add-zsh-hook # Load the zsh hook module.
add-zsh-hook preexec pre_validation # Adds the hook
# # enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
fi
# https://gnunn1.github.io/tilix-web/manual/vteconfig/
if [ $TILIX_ID ] || [ $VTE_VERSION ]; then
source /etc/profile.d/vte.sh
fi
# https://z.digitalclouds.dev/docs/getting_started/installation/#-setup-zi-directory
if [[ ! -f $HOME/.zi/bin/zi.zsh ]]; then
print -P "%F{33}▓▒░ %F{160}Installing (%F{33}z-shell/zi%F{160})…%f"
command mkdir -p "$HOME/.zi" && command chmod g-rwX "$HOME/.zi"
command git clone -q --depth=1 --branch "v1.0.1" https://github.com/z-shell/zi "$HOME/.zi/bin" && \
print -P "%F{33}▓▒░ %F{34}Installation successful.%f%b" || \
print -P "%F{160}▓▒░ The clone has failed.%f%b"
fi
zi_home="${HOME}/.zi"
source "${zi_home}/bin/zi.zsh"
autoload -Uz _zi
(( ${+_comps} )) && _comps[zi]=_zi
# https://github.com/z-shell/zsh-navigation-tools
zi load z-shell/zsh-navigation-tools
autoload znt-history-widget
zle -N znt-history-widget
bindkey "^R" znt-history-widget
zle -N znt-cd-widget
bindkey "^B" znt-cd-widget
zle -N znt-kill-widget
bindkey "^Y" znt-kill-widget
zi light zsh-users/zsh-autosuggestions
zi light z-shell/F-Sy-H
zi load romkatv/powerlevel10k
#zi ice depth=1; zi light romkatv/powerlevel10k
## https://z.digitalclouds.dev/docs/getting_started/overview/
zi snippet OMZ::plugins/archlinux
zi snippet OMZ::plugins/ansible
zi snippet OMZ::plugins/dotenv
zi snippet OMZ::plugins/docker
zi snippet OMZ::plugins/docker-compose
zi snippet OMZ::plugins/flutter
zi snippet OMZ::plugins/gnu-utils
zi snippet OMZ::plugins/gcloud
zi snippet OMZ::plugins/git
zi snippet OMZ::plugins/git-extras
zi snippet OMZ::plugins/github
zi snippet OMZ::plugins/gitignore
zi snippet OMZ::plugins/git-prompt
zi snippet OMZ::plugins/golang
zi snippet OMZ::plugins/gradle
zi snippet OMZ::plugins/helm
zi snippet OMZ::plugins/heroku
zi snippet OMZ::plugins/jump
zi snippet OMZ::plugins/kubectl
zi snippet OMZ::plugins/pip
zi snippet OMZ::plugins/python
zi snippet OMZ::plugins/ssh-agent
zi snippet OMZ::plugins/tmux
zi snippet OMZ::plugins/terraform
# https://github.com/zsh-users/zsh-history-substring-search
zi light zsh-users/zsh-history-substring-search
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down
export exa_params=('--git' '--classify' '--group-directories-first' '--time-style=long-iso' '--group' '--color-scale')
zi light zplugin/zsh-exa
eval "$(navi widget zsh)"
#eval "$(direnv hook zsh)"
#q To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
Aditional information
Moving the sourcing of .aliases and .functions solved the issue for me
- ❮ ZI ❯ Analytics:
❯ compiled – List plugins that are compiled
❯ zstatus – Overall status
❯ module help – Manage zpmod
❯ dtrace|dstart – Start tracking what's going on in session
❯ dstop – Stop tracking what's going on in session
❯ dreport – Report what was going on in session
❯ dunload – Revert changes recorded between dstart and dstop
❯ dclear – Clear report of what was going on in session
❯ bindkeys – List bindkeys
❯ clist|completions – List completions in use
❯ cdlist – Show compdef replay list
❯ csearch – Search for available completions from any plugin
❯ man – Show manual
❯ ls – List snippets in formatted and colorized manner
❯ status [--all] [plugin]|URL – Git status for plugin or svn status for snippet
❯ report [--all] [plugin] – Show reports
❯ times [-s][-m][-a] – Statistics on plugin load times, sorted in order of loading
❯ glance [plugin] – Look at plugin's source
❯ stress [plugin] – Test plugin for compatibility with set of options
❯ changes [plugin] – View plugin's git log
❯ recently [time] – Show plugins that changed recently (e.g.: 1 month 2 days)
❯ cd [plugin] – Enter plugin's directory; also support snippets, if feed with URL
❯ loaded|lists [keyword] – Show what plugins are loaded (filter: keyword)
Self-service
I'd be willing to address this documentation request myself.
Hook warning and info message are printed the same:
No files for compilation found…
Warning: ∞zi-compile-plugin-hook hook returned with 1
The warning hook should be removed with an exception if file compilation fails or only in verbose mode. In both scenarios, the return exit code has to be ensured.
Self-service
I'd be willing to address this documentation request myself.
Due unexpected behaviour (e.g: plugin) allow to reinstate it's status rather then deleting and downloading or etc. This would allow to quickly recover from unwanted behaviour by reinstating recent/possible parts in the environment.
Related Code
Currently, none which I can propose. (WIP)
Additional Context
Currently, perform various tasks to identify possible areas where reinstatement could be applied.
Self-service
I'd be willing to address this documentation request myself.
Create the default directory structure for ZPFX same time as ZI[HOME_DIR]. This prevents missing directories when installing plugins and can be documented and explained in the wiki on how it can be used.