Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: _tmux: fix window completion



With tmux 1.3 the output of "tmux list-windows" changed a little,
which threw off the completion slightly. This fix shouldn't break
completion with tmuxes prior to 1.2.
---
 Completion/Unix/Command/_tmux |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Completion/Unix/Command/_tmux b/Completion/Unix/Command/_tmux
index f250749..e9977fb 100644
--- a/Completion/Unix/Command/_tmux
+++ b/Completion/Unix/Command/_tmux
@@ -1479,7 +1479,7 @@ function __tmux-windows() {
     else
         opts=( )
     fi
-    wins=( ${${(f)"$(command tmux list-windows "${opts[@]}")"}/:[ $'\t']##/:} )
+    wins=( ${${(M)${(f)"$(command tmux list-windows "${opts[@]}")"}:#<->*}/:[ $'\t']##/:} )
     _describe -t windows 'windows' wins "$@"
     if [[ ${IPREFIX} != *: ]]; then
         _wanted sessions expl 'sessions' __tmux-sessions -S:
-- 
1.7.2.rc2



Messages sorted by: Reverse Date, Date, Thread, Author