diff options
Diffstat (limited to 'Completion')
-rw-r--r-- | Completion/Linux/Command/_e2label | 3 | ||||
-rw-r--r-- | Completion/Zsh/Command/_compdef | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/Completion/Linux/Command/_e2label b/Completion/Linux/Command/_e2label new file mode 100644 index 000000000..2545f72af --- /dev/null +++ b/Completion/Linux/Command/_e2label @@ -0,0 +1,3 @@ +#compdef e2label + +_arguments '1:device:_files' '2::volume label:(/dev/disk/by-label/*(N:t))' diff --git a/Completion/Zsh/Command/_compdef b/Completion/Zsh/Command/_compdef index 7a64da835..22af7f561 100644 --- a/Completion/Zsh/Command/_compdef +++ b/Completion/Zsh/Command/_compdef @@ -1,6 +1,6 @@ #compdef compdef -local state line expl list disp curcontext="$curcontext" pat normal ret=1 +local state line expl disp curcontext="$curcontext" pat normal ret=1 local args1 args2 typeset -A opt_args @@ -57,7 +57,8 @@ case $state in _wanted commands expl 'completed command' compadd -k _comps && ret=0 ;; cfun) - list=( ${^fpath:/.}/_(|*[^~])(:t) ) + typeset -aU list=( ${(v)_comps} ${(k)functions[(I)_*]} ) + (( ${+list[1]} )) || list+=( ${^fpath:/.}/_(|*[^~])(:t) ) if zstyle -T ":completion:${curcontext}:functions" prefix-hidden; then disp=( ${list[@]#_} ) _wanted functions expl 'completion function' \ |