Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] Completion: Add _shuf, _tac, _uptime



On 2 Jun 2018, at 18:07, dana <dana@xxxxxxx> wrote:
>tac (from GNU Coreutils)

Martin alerted me to the fact that NetBSD has recently gained its own version of
tac. Sorry, i should have checked more thoroughly. Anyway, we might as well
support it properly if we're adding stuff — here's a new patch. (The other two
are still fine.)

dana


diff --git a/Completion/Unix/Command/_tac b/Completion/Unix/Command/_tac
new file mode 100644
index 000000000..7a15bffff
--- /dev/null
+++ b/Completion/Unix/Command/_tac
@@ -0,0 +1,19 @@
+#compdef tac gtac
+
+local variant
+
+_pick_variant -r variant gnu='Free Soft' unix --version
+
+# NetBSD (at least) has its own bare-bones version of this tool
+[[ $variant == gnu ]] || {
+  _default
+  return
+}
+
+_arguments -s -S : \
+  '(: -)--help[display help information]' \
+  '(: -)--version[display version information]' \
+  '(-b --before)'{-b,--before}'[attach separator before instead of after]' \
+  '(-r --regex)'{-r,--regex}'[treat separator as regular expression (with -s)]' \
+  '(-s --separator)'{-s+,--separator=}'[use specified separator instead of newline]:separator' \
+  '*: :_files'



Messages sorted by: Reverse Date, Date, Thread, Author