/usr/share/zsh/site-functions/_vifm is in vifm 0.9.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | #compdef vifm
local curcontext="$curcontext" state state_descr line expl ret=1
typeset -A opt_args
_path_or_hyphen() {
_alternative \
'files:path:_files' \
'hyphen:hyphen:(-)'
}
_arguments -C -s \
'--select[open parent directory of the given path and select specified file in it]:path:_files' \
'-f[makes vifm instead of opening files write selection to $VIFM/vimfiles and quit]' \
'--choose-files[sets output file to write selection into on exit instead of opening files]:path or hyphen:_path_or_hyphen' \
'--choose-dir[sets output file to write last visited directory into on exit]:path or hyphen:_path_or_hyphen' \
'--delimiter[sets separator for list of file paths written out by vifm]:delimiter: ' \
'--on-choose[sets command to be executed on selected files instead of opening them]:command:_cmdstring' \
'--logging=-[log some operational details]::startup log path:_files' \
'--server-list[list available server names and exit]' \
'--server-name[name of target or this instance]:server name:->server' \
'--remote[passes all arguments that left in command line to vifm server]' \
'--remote-expr[passes expression to vifm server and prints result]' \
'*'{-c,+-}'[run command on startup]:command: ' \
{-h,--help}'[show help message and quit]' \
{-v,--version}'[show version number and quit]' \
'--no-configs[don'\''t read vifmrc and vifminfo]' \
'1::path:->path' \
'2::path:->path' && ret=0
if [[ $state == path ]]; then
# only one hyphen is allowed
if (( ! ${line[(I)-]} )); then
_path_or_hyphen && ret=0
else
_description files expl $state_descr
_files "$expl[@]" && ret=0
fi
elif [[ $state == server ]]; then
local -a servers
servers=( ${(f)"$(_call_program servers $words[1] --server-list 2>/dev/null)"} )
_wanted servers expl $state_descr compadd -M 'm:{a-z}={A-Z}' -a servers && ret=0
fi
return ret
# vim: ft=zsh sw=2 ts=2 et
|