diff options
author | Matthew Martin <phy1729@gmail.com> | 2018-06-15 14:12:12 -0500 |
---|---|---|
committer | Matthew Martin <phy1729@gmail.com> | 2018-06-15 14:15:56 -0500 |
commit | d5360e324c1e4ff0c3a38ba318124435676d7610 (patch) | |
tree | 5f04d5673bf9a3bd8bb27b3f9fb485afbb9db875 /Completion/Unix/Command | |
parent | 9408c4825b339c43299a39b46811fc6153740e01 (diff) | |
download | zsh-d5360e324c1e4ff0c3a38ba318124435676d7610.tar.gz zsh-d5360e324c1e4ff0c3a38ba318124435676d7610.tar.xz zsh-d5360e324c1e4ff0c3a38ba318124435676d7610.zip |
42981: Add ed completer
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r-- | Completion/Unix/Command/_ed | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_ed b/Completion/Unix/Command/_ed new file mode 100644 index 000000000..50d2710fc --- /dev/null +++ b/Completion/Unix/Command/_ed @@ -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' |