From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: zsh-workers@zsh.org
Subject: Re: [PATCH] _tmux: Complete external commands
Date: Fri, 20 Nov 2015 03:36:15 +0000 [thread overview]
Message-ID: <20151120033615.GC3955@tarsus.local2> (raw)
In-Reply-To: <20151118230936.GF2070@tarsus.local2>
Daniel Shahaf wrote on Wed, Nov 18, 2015 at 23:09:36 +0000:
> ---
> This makes 'tmux new <TAB>' and 'tmux new tru<TAB>' complete external
> commands, previously they just failed to complete anything.
s/_command/_cmdstring/ was also needed, and with that made, it works
even without the s/::/:/, so that's what I'll commit.
diff --git a/Completion/Unix/Command/_tmux b/Completion/Unix/Command/_tmux
index 6f2cac7..d218cc3 100644
--- a/Completion/Unix/Command/_tmux
+++ b/Completion/Unix/Command/_tmux
@@ -640,7 +640,7 @@ function _tmux-new-session() {
'-t[specify target session]:sessions:__tmux-sessions'
'-x[specify width]:width:_guard "[0-9]#" "numeric value"'
'-y[specify height]:height:_guard "[0-9]#" "numeric value"'
- '*:: :_command'
+ '*:: :_cmdstring'
)
_arguments -s ${args}
}
@@ -657,7 +657,7 @@ function _tmux-new-window() {
'-n[specify a window name]:window name:'
'-P[print information about new window after it is created]'
'-t[specify target window]:windows:__tmux-windows'
- '*:: :_command'
+ '*:: :_cmdstring'
)
_arguments ${args}
}
@@ -776,7 +776,7 @@ function _tmux-respawn-pane() {
args=(
'-k[kill window if it is in use]'
'-t[choose target pane]:window:__tmux-pane'
- '*::command:_command'
+ '*::command:_cmdstring'
)
_arguments ${args}
}
@@ -787,7 +787,7 @@ function _tmux-respawn-window() {
args=(
'-k[kill window if it is in use]'
'-t[choose target window]:window:__tmux-windows'
- '*::command:_command'
+ '*::command:_cmdstring'
)
_arguments ${args}
}
@@ -809,7 +809,7 @@ function _tmux-run-shell() {
args=(
'-b[run shell command in background]'
'-t[choose target pane]:pane:__tmux-panes'
- '*::command:_command'
+ '*::command:_cmdstring'
)
_arguments ${args}
}
@@ -1042,7 +1042,7 @@ function _tmux-split-window() {
# changing the command's name might annoy users. So it stays like
# this.
'-t[choose target pane]:window:__tmux-panes'
- '*:: :_command'
+ '*:: :_cmdstring'
)
_arguments ${args} && return
}
prev parent reply other threads:[~2015-11-20 3:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-18 23:09 Daniel Shahaf
2015-11-20 3:36 ` Daniel Shahaf [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151120033615.GC3955@tarsus.local2 \
--to=d.s@daniel.shahaf.name \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).