From 3585c28c36f98840de66e7ac8ccfe6f274162097 Mon Sep 17 00:00:00 2001 From: dana Date: Sat, 2 Jun 2018 23:58:47 -0500 Subject: [PATCH] 42922: new tac completion --- ChangeLog | 2 ++ Completion/Unix/Command/_tac | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 Completion/Unix/Command/_tac diff --git a/ChangeLog b/ChangeLog index fafc9e9e3..626b0d970 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2018-06-03 Oliver Kiddle + * 42922: dana: Completion/Unix/Command/_tac: new tac completion + * 42881: Completion/Unix/Command/_ghostscript: update options in ghostscript completion and query more matches directly from it 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'