From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id ed7854ff for ; Sun, 3 Mar 2019 21:15:25 +0000 (UTC) Received: (qmail 17319 invoked by alias); 3 Mar 2019 21:15:05 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 44099 Received: (qmail 6063 invoked by uid 1010); 3 Mar 2019 21:15:05 -0000 X-Qmail-Scanner-Diagnostics: from mail-io1-f46.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.100.2/25376. spamassassin: 3.4.2. Clear:RC:0(209.85.166.46):SA:0(-1.9/5.0):. Processed in 2.73918 secs); 03 Mar 2019 21:15:05 -0000 X-Envelope-From: dana@dana.is X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.166.46 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dana-is.20150623.gappssmtp.com; s=20150623; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=RgbDnZCxvlbRaGPZz6EAfyLNpiVS+Pe2eg9bOEXq3xo=; b=C3xVDauT0KT/wBV8BlxkOrg9zdxMKuqllFr3+mA+40v0eovnzbDy/Nm86HAVeKWiBK UNG9VjiBofQksW60OwD7pjTBddXW4qoqxEepchF4GibANHd6bOXUwqzDfq5xQSAIOR6A GlphshSz05DhhWouRXIj744Ikg8vyM6YfoFRG+z2PhqSKhh4yU2eo5RVnIyDavnaW4va RxHtAt5WdTkpsHg06vSQFDNIkA1UgL2NwCGwYMs+TXJ700gugZPmj70AooiY5R1URh4b +AMwoRbj8CoOK34jNdyUuN4BSXO0RGZ7VFYVkNn++7Q1VpFaAp2HKme43tCqlkLpYFte HKWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=RgbDnZCxvlbRaGPZz6EAfyLNpiVS+Pe2eg9bOEXq3xo=; b=cAKIJ0NczqYrzfB+PcN2Y6cxo7SsxIxT2/w1PJcqVNVt9j2d0Zan7PQe/KkSadH6oM kZrPLAPDIOU3ZzeJfYq3qnaLsDyY6YwXqX8qYG4tAkNLX1d+yYaWdesOyZMTUWx/wwCE lBnkcooVegUSkZQhfUIcfIMa2rSDOOJR+AetepBSHxaNK7SWslVaDWV5uHVHVKAoxF/u wMxvOYy0EAskFdmnD3ku5TgpVU4a4afeMxqP+6rssFkneLwpOlYRw2DgWmPTxMdWn+cv 8JC5/k7TZR4KMMMm930ONgKzh4L60qc1R80ubwR2AnnebEnidQPOa1aL0q04g2tFy1od 2g4g== X-Gm-Message-State: APjAAAVgF95KmYGRB9T+HovJurDmEJPO8qlBk0VGjv0roH6uTgXEIXNk d1Rootc5Xrv86S+kUAwLUlO8mIZBzPblNQ== X-Google-Smtp-Source: APXvYqyKMcgurb+6JCPRpS+Qj6H0A2DR4E8HF1UXomeMqaJjSWUe377vSb0PCTzPkeO5bSQwgQcksw== X-Received: by 2002:a6b:7405:: with SMTP id s5mr7938791iog.1.1551647667683; Sun, 03 Mar 2019 13:14:27 -0800 (PST) From: dana Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.0 \(3445.100.39\)) Subject: [PATCH] Completion: Add _trash Message-Id: <0AEBC5FB-9CE8-4E1D-8A9B-C6667E765090@dana.is> Date: Sun, 3 Mar 2019 15:14:24 -0600 To: Zsh hackers list X-Mailer: Apple Mail (2.3445.100.39) Completion for the rm-like tool for macOS dana 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=3D'(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