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 41a3f2b2 for ; Mon, 31 Dec 2018 02:11:07 +0000 (UTC) Received: (qmail 19983 invoked by alias); 31 Dec 2018 02:10:53 -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: 43960 Received: (qmail 20638 invoked by uid 1010); 31 Dec 2018 02:10:53 -0000 X-Qmail-Scanner-Diagnostics: from mail-it1-f193.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.100.2/25112. spamassassin: 3.4.2. Clear:RC:0(209.85.166.193):SA:0(-1.9/5.0):. Processed in 2.575646 secs); 31 Dec 2018 02:10:53 -0000 X-Envelope-From: dana@dana.is X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | 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=eW3nUNLYxymAZWNnQZ/8ddX0hQqvmah4pR+iIErsQhs=; b=ExcrNdDrM+c3xIRVMXaS48mkTqG0yDMCgJuoi/OKD69RVGPyPau3d5hs57kXEXhvo9 PwvD1UlJiGnqFOWjKLP9Q/7QPivuaWULVDL8oQ2sW+plQfc32+NfhcMislYtTo3bSezK I/83FJdXT+k/ZPJSggsbpKt9k2M9lMhJ9QDeeLnOPke8b9Rx5bdAP1IGu3163w0nFcmm 7sJ7e9MKEhQ4NYtH/+RaCUh+9mvU8Y9rRP1cx4TQCiTnUn2oa3WMWk9DR3b4dGmZ6IDh y+pTnCzX8tqe3apN22hkWH8JWHLTVuCz+cNWkKLLcrKHvIXAKnBL2lfuf4odvFavcqEw 1xLA== 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=eW3nUNLYxymAZWNnQZ/8ddX0hQqvmah4pR+iIErsQhs=; b=d8AHFLYeJEm9rFhtBHCz7DuAma8UTTcJpRlzTbMurvRCNm96Y7TSF/+7+UVgG2k+Yb j8u0oEi7qPt/HhKBy0QxYZyco47fTbrKGPs+0tFwK9TUQCfIWMiwpabtU8DuawxV0w3v JHXNx0HTqgTpleN9lkhC/GNsZ1n9uvX3IOYievhK2Sj8269dlthpOhdoTgbt8ycSbFtD tOeh8tmNqqvonvK8kgl9cT2uMmVFFvp0IRV/kbQzmZjehB/K00VeJZKgO/ryuq1eXMvo H7Ubblzb/J6k/38Dg2x8QQLXXpGV1e9ahukcWBslwPx50FlfaP0baZJA87J64z3w1mD9 Es0w== X-Gm-Message-State: AA+aEWa3u2Sr/Ny181QK16OOCeGQSJfjfHSFd58PrpPbUEqdAnhYBb6X SdyiO3Kg2CgGrFKi4SLk6hPjWlKAs3l86w== X-Google-Smtp-Source: AFSGD/W0WPanynl8CGiSe7WFSSF4NOqIfeAbCev2I++Le+hQT+rJRQm8R99AzZYt72IG3Og4eF25NQ== X-Received: by 2002:a02:410e:: with SMTP id x14mr22267513jaa.36.1546222247072; Sun, 30 Dec 2018 18:10:47 -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: Break out _exec, _setsid Message-Id: <8F13F9DC-CC61-43DC-8EFF-D422538DE20A@dana.is> Date: Sun, 30 Dec 2018 20:13:10 -0600 To: Zsh workers X-Mailer: Apple Mail (2.3445.100.39) This breaks exec and setsid out of _precommand into their own functions. I put _setsid under Linux with the rest of the util-linux stuff, though = it does work on other platforms (it's in Homebrew for example), so maybe = that's arguable dana diff --git a/Completion/Linux/Command/_setsid = b/Completion/Linux/Command/_setsid new file mode 100644 index 000000000..a8107e582 --- /dev/null +++ b/Completion/Linux/Command/_setsid @@ -0,0 +1,12 @@ +#compdef setsid + +[[ $service =3D=3D setsid ]] && precommands+=3D( setsid ) + +_arguments -s -S -A '-*' : \ + '(: * -)'{-h,--help}'[display help information]' \ + '(: * -)'{-V,--version}'[display version information]' \ + '(-c --ctty)'{-c,--ctty}'[set controlling terminal to current one]' \ + '(-f --fork)'{-f,--fork}'[always fork]' \ + '(-w --wait)'{-w,--wait}'[wait for program to exit, and use same = return code]' \ + '1: :_path_commands' \ + '*:: : _normal' diff --git a/Completion/Zsh/Command/_exec b/Completion/Zsh/Command/_exec new file mode 100644 index 000000000..8de341a02 --- /dev/null +++ b/Completion/Zsh/Command/_exec @@ -0,0 +1,9 @@ +#compdef exec + +[[ $service =3D=3D exec ]] && precommands+=3D( exec ) + +_arguments -s -S -A '-*' : \ + '-a+[set argv\[0\] to specified string]:argv[0] string' \ + '-c[clear environment]' \ + '-l[simulate login shell (prepend - to argv\[0\])]' \ + '*:: : _normal' diff --git a/Completion/Zsh/Command/_precommand = b/Completion/Zsh/Command/_precommand index f57e668c6..c9eef78af 100644 --- a/Completion/Zsh/Command/_precommand +++ b/Completion/Zsh/Command/_precommand @@ -1,4 +1,4 @@ -#compdef - nohup eval time rusage noglob nocorrect exec catchsegv aoss = hilite eatmydata setsid +#compdef - nohup eval time rusage noglob nocorrect catchsegv aoss = hilite eatmydata =20 # precommands is made local in _main_complete precommands+=3D($words[1])