From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16560 invoked by alias); 20 Jul 2017 21:10:00 -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: 41444 Received: (qmail 17964 invoked from network); 20 Jul 2017 21:10:00 -0000 X-Qmail-Scanner-Diagnostics: from out1-smtp.messagingengine.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(66.111.4.25):SA:0(-0.7/5.0):. Processed in 1.085471 secs); 20 Jul 2017 21:10:00 -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.7 required=5.0 tests=RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:date:from:message-id:subject:to :x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=ENly/e 4t+wIrVkPCTvcEZr1Z6HLL0xdzG3XlkfVWoFw=; b=YtoDBiVzywc9uwh/uRRVOT E2Uvb2TkCvCwGT3lXjhqNxVwkj3tGXNJQ6Wa+ekMeRNMbyDP6EbQQrMU3HR41jzX EHd3aG7v9dAgkyut89oT2+YySdfYszTgabO5pSyEnigHM7ebKR4cMcb4trzVbO3P y9BcyAog8EGFrYSKwLVsiZIPoWqq86+Kv/fEykLz8Ia2DdhL5oUnOSXHYrI8iE4E bNn87QwwYWfBSumkgIYyM+7Qqn8dQEp2rm49555jaG0WwUgtyXpKEvd/JaJU/TCH 693VEmaovKMpoRxwqY44VgI2thgFSZnzmzOz2SvRY0ddU0Faeyqnm6BoQbwEsOGA == DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:message-id:subject:to :x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=ENly/e 4t+wIrVkPCTvcEZr1Z6HLL0xdzG3XlkfVWoFw=; b=FHr16RYUROR9cZGp9mStam VlZOqVmCxeaWfiepOC/ysIPBsM4GigUv/ZPr4+6OJ74BYc7AhqvBAPI8TPrvxx01 N7dJPQVZN1/m1l8H/3ogjxgy6eTbZZYveqxIogX7zuGX/e2voreqRs5CsH46TJKL 6OsFbpw9l7MBt9OirUWbneuNdljIg1Wu3NkSnf0InwbZgSLZfkk2bp3gGe+4/IWg 0MYSUJ6NlaWj3Kgk6kfD/iTLNp+O9obgmafBTO3p7qQkijI+se2E0/MbnORWAIN7 nuRE20mLPecRD4d5y2xpAC01A0xUlKHRm8UdMqbxl37NSNV2ApKM9CgtF6+JSPQA == X-ME-Sender: X-Sasl-enc: klFJBtnZH2hTcevROU8WVcCcP+PTOtckxsryqfM1ICH4 1500584296 From: Daniel Shahaf To: zsh-workers@zsh.org Cc: Daniel Shahaf Subject: [PATCH] Correct completion of 'tmux new '. Date: Thu, 20 Jul 2017 20:58:13 +0000 Message-Id: <20170720205813.15939-1-danielsh@tarpaulin.shahaf.local2> X-Mailer: git-send-email 2.11.0 Reference: window_pane_spawn() in tmux 2.5. Also, document _cmdstring and _precommand. --- To reproduce: % touch foo\ bar % tmux new ls ./foo % tmux new ls\ ./foo Use remain-on-exit (or a script that calls ls and sleeps) to see the difference. Cheers, Daniel Completion/Unix/Command/_tmux | 2 +- Doc/Zsh/compsys.yo | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/Completion/Unix/Command/_tmux b/Completion/Unix/Command/_tmux index 0917da604..5f5bea922 100644 --- a/Completion/Unix/Command/_tmux +++ b/Completion/Unix/Command/_tmux @@ -526,7 +526,7 @@ _tmux-new-session() { '-t+[specify target session]:session:__tmux-sessions' \ '-x[specify width]:width' \ '-y[specify height]:height' \ - '*:: :_cmdstring' + '*:: :_cmdambivalent' } _tmux-new-window() { diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo index 47b07e85e..47c30843c 100644 --- a/Doc/Zsh/compsys.yo +++ b/Doc/Zsh/compsys.yo @@ -3014,6 +3014,17 @@ tt(-n), tt(-F), tt(-X) are passed to tt(compadd). See tt(_description) for a description of var(tag) and var(descr). ) +findex(_cmdambivalent) +item(tt(_cmdambivalent))( +Completes an external command. +If there is a single argument, complete the command in a single word, like tt(_cmdstring); +otherwise, complete the command in word-separated arguments, like tt(_precommand). +) +findex(_cmdstring) +item(tt(_cmdstring))( +Completes an external command as a single argument, as for +tt(system+LPAR()...+RPAR()). +) findex(_complete) item(tt(_complete))( This completer generates all possible completions in a context-sensitive @@ -3214,6 +3225,11 @@ tt(old-menu), see ifzman(the section `Completion System Configuration' above)\ ifnzman(noderef(Completion System Configuration)). ) +findex(_precommand) +item(tt(_precommand))( +Complete an external command in word-separated arguments, as for +tt(exec) and tt(/usr/bin/env). +) findex(_prefix) item(tt(_prefix))( This completer can be used to try completion with the suffix (everything