From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27089 invoked by alias); 7 Sep 2016 12:59:45 -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: X-Seq: 39221 Received: (qmail 13814 invoked from network); 7 Sep 2016 12:59:45 -0000 X-Qmail-Scanner-Diagnostics: from mail-oi0-f68.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.218.68):SA:0(0.3/5.0):. Processed in 0.316726 secs); 07 Sep 2016 12:59:45 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,SPF_PASS,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.1 X-Envelope-From: phy1729@gmail.com 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.218.68 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mail-followup-to:mime-version :content-disposition:user-agent; bh=TAuuiAR2hW6/42PFXhVxbP1hHiFE8uZN4f3eJvhEM5s=; b=nVvgLAw8ERqCIphHXwFqxhHfdbGqWSvIhF26Ucw9yN0/txB667Haov/NzWKpje6hsb R6fIhp8E5H0+q22YZppeuuiCWkLM2C8IUqt5h0n6oIUEbzlIbHMJ7+OB7zhD+Km7RgCV nb5ny4iUY9R1mixEs3kN4IhS4OxJ6Q9aFgcrQHK/N/Xc+ia7NMKxdvVeNn7YlHTIS6uo vPJnHy/LhvWNUtIJa7Z5T9Z+Wdw+vC18FphCzECFF9E0hZrOSOJaWdnETE/z6OskkUOY zzHiTdgLJHZFPecl5xYepoHwVR7pv8vrJzjB8HoSMgGyudHOcsETnbllVeiehm83+ifY qpTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:mail-followup-to :mime-version:content-disposition:user-agent; bh=TAuuiAR2hW6/42PFXhVxbP1hHiFE8uZN4f3eJvhEM5s=; b=HbR1t2iZb3vDOKknR5HAMHQwxpg0MFmZrl6HxgWWYtQ9fBinmBqrXeLniZaxPsYilH kMacdR+XHWo/nXRi3Wu+LdyPaxZLIVes8BWrtuXaxk8kB8qkTMal8Dtxe+1Qu+1eyjvl unRgBCXfJKbMZUx7NrYj4btgt/AFEsxmbDim/YATBVsjAPaLGlkugmXBdX5RBthRjqsM k1O8kRTQ12/I3pcD9N45YYYGC5ExuwrESxaNzu17p6LVrhlwP1+tMuBrO/XilSLkrYE+ YafmnQtL8qJjCLA2ZDBUNcfHVMtbgM7sNNEbe0+aZDaBEbFRW5Nsc2RXGoeJV3d5kZs6 K4qA== X-Gm-Message-State: AE9vXwOPOH3FqM5c6Z5parxnZ9hJh4pyLw1bwezGOdMIvuFsdKVN3vTuJkFowberq9nqUg== X-Received: by 10.202.199.78 with SMTP id x75mr13190490oif.180.1473252085677; Wed, 07 Sep 2016 05:41:25 -0700 (PDT) Date: Wed, 7 Sep 2016 07:41:24 -0500 From: Matthew Martin To: zsh-workers@zsh.org Subject: [patch] _rm: Update BSD options Message-ID: <20160907124124.rve4rr3uhyn5end4@CptOrmolo.darkstar> Mail-Followup-To: zsh-workers@zsh.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: NeoMutt/20160827 () This also didn't go through. args=(${args:#*)--*\[*} to catch all the long options without specifying each one. Also kills the tabs lurking in the file. - Matthew Martin diff --git a/Completion/Unix/Command/_rm b/Completion/Unix/Command/_rm index 4d0dbdb..4a5c9a1 100644 --- a/Completion/Unix/Command/_rm +++ b/Completion/Unix/Command/_rm @@ -22,16 +22,24 @@ if _pick_variant gnu=gnu unix --help; then '(- *)--version[output version information and exit]' ) else - args=(${args:#*--(force|recursive)\[*}) + args=(${args:#*)--*\[*}) case $OSTYPE in - freebsd*) + dragonfly*|freebsd*|netbsd*|openbsd*) args+=( '-d[remove directories as well]' - '(-i)-I[prompt when removing many files]' - '-P[overwrite files before deleting them]' - '-v[explain what is being done]' - '-W[attempt to undelete named files]' - "-x[don't cross file systems when removing a hierarchy]" + '-P[overwrite files before deleting them]' + ) + ;; + dragonfly*|freebsd*|netbsd*) + args+=( + '-v[explain what is being done]' + '-W[attempt to undelete named files]' + "-x[don't cross file systems when removing a hierarchy]" + ) + ;; + dragonfly*|freebsd*) + args+=( + '(-i)-I[prompt when removing many files]' ) ;; esac