mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-19 02:02:32 +01:00
make it nicer
This commit is contained in:
parent
2ae810da82
commit
36b810a455
1 changed files with 9 additions and 6 deletions
|
|
@ -10,9 +10,12 @@ if [[ ! -f "$ZSH_CACHE_DIR/completions/_procs" ]]; then
|
||||||
_comps[procs]=_procs
|
_comps[procs]=_procs
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check which flag is supported by the installed version of procs
|
{
|
||||||
if procs --help 2>&1 | grep -q -- "--gen-completion-out"; then
|
autoload -Uz is-at-least
|
||||||
procs --gen-completion-out zsh >| "$ZSH_CACHE_DIR/completions/_procs" &|
|
local _version=$(procs --version)
|
||||||
|
if is-at-least "0.14" "${_version#procs }"; then
|
||||||
|
procs --gen-completion-out zsh >| "$ZSH_CACHE_DIR/completions/_procs"
|
||||||
else
|
else
|
||||||
procs --completion-out zsh >| "$ZSH_CACHE_DIR/completions/_procs" &|
|
procs --completion-out zsh >| "$ZSH_CACHE_DIR/completions/_procs"
|
||||||
fi
|
fi
|
||||||
|
} &|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue