zsh-workers
 help / color / mirror / code / Atom feed
From: Matthew Martin <phy1729@gmail.com>
To: zsh-workers@zsh.org
Subject: [patch] _ed completer
Date: Wed, 2 May 2018 22:22:27 -0500	[thread overview]
Message-ID: <20180503032226.GA26793@CptOrmolo.darkstar> (raw)

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'


             reply	other threads:[~2018-05-03  3:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-03  3:22 Matthew Martin [this message]
2018-05-04 13:00 ` Oliver Kiddle
2018-06-11  4:01   ` Matthew Martin
2018-06-11  4:26     ` Matthew Martin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180503032226.GA26793@CptOrmolo.darkstar \
    --to=phy1729@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).