From a41f09f86206c281e7512f6e3b6e0ef944c20989 Mon Sep 17 00:00:00 2001 From: dana Date: Wed, 6 Mar 2019 17:37:11 -0600 Subject: 44099: Completion: Add _trash --- Completion/Darwin/Command/_trash | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Completion/Darwin/Command/_trash (limited to 'Completion/Darwin') diff --git a/Completion/Darwin/Command/_trash b/Completion/Darwin/Command/_trash new file mode 100644 index 000000000..658716432 --- /dev/null +++ b/Completion/Darwin/Command/_trash @@ -0,0 +1,22 @@ +#compdef trash + +# We only provide completion for Ali Rantakari's trash utility. There are/were a +# few others floating around with that name, but this is the one available as +# `trash` in Homebrew and MacPorts +_pick_variant ali='(Rantakari|hasseg)' other --version && { + # The hidden options here are options to rm that trash silently (and + # undocumentedly) ignores. Some options are not made mutually exclusive where + # they technically could be, for compatibility with aliases, etc. + _arguments -s -S -A '-*' : \ + '!-'{d,f,i,r,P,R,W} \ + '(: * -F -l -v)-e[empty trash]' \ + '-F[use Finder instead of system API]' \ + '(: * -e -F -s -y)-l[list items in trash]' \ + '(: * -F -l -v)-s[securely empty trash]' \ + '-v[increase output verbosity]' \ + '-y[skip confirmation prompts (with -e or -s)]' \ + '*: :_files' + return +} + +_default -- cgit 1.4.1