Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[patch] _ed completer
- X-seq: zsh-workers 42745
- From: Matthew Martin <phy1729@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [patch] _ed completer
- Date: Wed, 2 May 2018 22:22:27 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mail-followup-to:mime-version :content-disposition:user-agent; bh=L7bZXf844wh/ugIWXywsPG+NoVbnLi4miyvshyWLMs8=; b=qo5JLphzduOC5i8OARSUmxIN6MLRNq6Dcm8iRnW+ZPkMIGM/dgWGlJFNpqufRfAXWP zv7l/wY9oz5AeyIzZE00yOhR2/3fd8/En0O0mam6xlMXjefHeQlsAaJZFNWgDSg7fDt+ Mmt4iX9mM6B21+QBYRDB+sL/TxBB6hH1DkSfFYjbPKXQbFScQ99Juon3jfnn+94dw1t/ CZTXUdW/Yhd62NpB0UVlnbVA3ucZR8ELJB6eRy15sGt5945hh2TvtxtkLF1W4crtvGds F4GE3SlYDVUYvmF9mdSu8jhZ8W3axSbBnY/6C1OABxB14SNL69vWuLfAhZjPFJFFddBF ZFKw==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mail-followup-to: zsh-workers@xxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Add completer for ed.
- Matthew Martin
diff --git a/Completion/Unix/Command/_ed b/Completion/Unix/Command/_ed
new file mode 100644
index 000000000..7ab40d341
--- /dev/null
+++ b/Completion/Unix/Command/_ed
@@ -0,0 +1,38 @@
+#compdef ed
+
+local -a args
+
+args=(
+ '(--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=(${args:#*\)--*})
+ case $OSTYPE in
+ dragonfly*|freebsd*|netbsd*)
+ args+=(
+ '-x[prompt for an encryption key]'
+ )
+ ;|
+ netbsd*)
+ args+=(
+ '-E[enable extended regular expressions]'
+ '-S[disable ! command]'
+ )
+ ;;
+ esac
+fi
+
+_arguments -s -S -A '-*' \
+ $args \
+ ':file:_files'
Messages sorted by:
Reverse Date,
Date,
Thread,
Author