mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-01 09:41:44 +02:00
42981: Add ed completer
This commit is contained in:
parent
9408c4825b
commit
d5360e324c
2 changed files with 42 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
2018-06-15 Matthew Martin <phy1729@gmail.com>
|
||||
|
||||
* 42981: Completion/Unix/Command/_ed: Add ed completer
|
||||
|
||||
2018-06-15 Peter Stephenson <p.stephenson@samsung.com>
|
||||
|
||||
* users/23472: Doc/Zsh/mod_system.yo, Src/Modules/system.c,
|
||||
|
|
38
Completion/Unix/Command/_ed
Normal file
38
Completion/Unix/Command/_ed
Normal file
|
@ -0,0 +1,38 @@
|
|||
#compdef ed
|
||||
|
||||
local -a args
|
||||
|
||||
args=(
|
||||
'(-p --prompt)'{-p+,--prompt=}'[specify prompt]:prompt:'
|
||||
'(-s --quiet --silent)'{-s,--quiet,--silent}'[suppress diagnostics]'
|
||||
)
|
||||
|
||||
if _pick_variant gnu=GNU unix --version; then
|
||||
args+=(
|
||||
'(-G --traditional)'{-G,--traditional}'[run in compatibility mode]'
|
||||
'(- :)'{-h,--help}'[display help]'
|
||||
'(-l --loose-exit-status)'{-l,--loose-exit-status}'[exit 0 even if a command fails]'
|
||||
'(-r --restricted)'{-r,--restricted}'[run in restricted mode]'
|
||||
'(- :)'{-V,--version}'[display version]'
|
||||
'(-v --verbose)'{-v,--verbose}'[be verbose]'
|
||||
)
|
||||
else
|
||||
args=(-A '-*' ${args:#*\)--*})
|
||||
case $OSTYPE in
|
||||
dragonfly*|freebsd*|netbsd*|solaris*)
|
||||
args+=(
|
||||
'-x[prompt for an encryption key]'
|
||||
)
|
||||
;|
|
||||
netbsd*)
|
||||
args+=(
|
||||
'-E[enable extended regular expressions]'
|
||||
'-S[disable ! command]'
|
||||
)
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
_arguments -s -S \
|
||||
$args \
|
||||
':file:_files'
|
Loading…
Reference in a new issue