Skip to content
Browse files

30372: _tmux: redirect errors to /dev/null

  • Loading branch information...
1 parent f3a1ac8 commit 9db18318288d7a413885fb5d1618bf239b6ed182 @Mikachu Mikachu committed Mar 24, 2012
Showing with 10 additions and 7 deletions.
  1. +4 −1 ChangeLog
  2. +6 −6 Completion/Unix/Command/_tmux
View
5 ChangeLog
@@ -3,6 +3,9 @@
* 30371: Completion/Unix/Command/_ssh: You can specify -i
multiple times.
+ * 30372: Completion/Unix/Command/_tmux: Redirect error output
+ produced when no tmux server is running to /dev/null.
+
2012-03-23 Simon Ruderich <simon@ruderich.org>
* 30366: Misc/vcs_info-examples: Fix outdated quilt examples.
@@ -16113,5 +16116,5 @@
*****************************************************
* This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.5612 $
+* $Revision: 1.5613 $
*****************************************************
View
12 Completion/Unix/Command/_tmux
@@ -1097,15 +1097,15 @@ function __tmux-buffers() {
local -a bopts; bopts=()
fi
- buffers=( ${${(f)"$(command tmux list-buffers "${bopts[@]}")"}/:[ $'\t']##/:} )
+ buffers=( ${${(f)"$(command tmux 2> /dev/null list-buffers "${bopts[@]}")"}/:[ $'\t']##/:} )
_describe -t buffers 'buffers' buffers
}
function __tmux-bound-keys() {
local expl
local -a keys
- keys=( ${${${${(f)"$(command tmux list-keys "$@")"}/:[ $'\t']##/:}/(#s)[ $'\t']##/}/(#s):/\\:} )
+ keys=( ${${${${(f)"$(command tmux 2> /dev/null list-keys "$@")"}/:[ $'\t']##/:}/(#s)[ $'\t']##/}/(#s):/\\:} )
_describe -t keys 'keys' keys
}
@@ -1124,7 +1124,7 @@ function __tmux-choose-stuff() {
function __tmux-clients() {
local expl
local -a clients
- clients=( ${${(f)"$(command tmux list-clients)"}/:[ $'\t']##/:} )
+ clients=( ${${(f)"$(command tmux 2> /dev/null list-clients)"}/:[ $'\t']##/:} )
_describe -t clients 'clients' clients
}
@@ -1400,7 +1400,7 @@ function __tmux-panes() {
opts=( )
fi
num=0
- command tmux list-panes "${opts[@]}" | while IFS= read -r line; do
+ command tmux 2> /dev/null list-panes "${opts[@]}" | while IFS= read -r line; do
panes+=( $(( num++ )):${line//:/} )
done
_describe -t panes 'panes' panes "$@"
@@ -1421,7 +1421,7 @@ function __tmux-server-options() {
function __tmux-sessions() {
local expl
local -a sessions
- sessions=( ${${(f)"$(command tmux list-sessions)"}/:[ $'\t']##/:} )
+ sessions=( ${${(f)"$(command tmux 2> /dev/null list-sessions)"}/:[ $'\t']##/:} )
_describe -t sessions 'sessions' sessions "$@"
}
@@ -1479,7 +1479,7 @@ function __tmux-windows() {
else
opts=( )
fi
- wins=( ${${(M)${(f)"$(command tmux list-windows "${opts[@]}")"}:#<->*}/:[ $'\t']##/:} )
+ wins=( ${${(M)${(f)"$(command tmux 2> /dev/null list-windows "${opts[@]}")"}:#<->*}/:[ $'\t']##/:} )
_describe -t windows 'windows' wins "$@"
if [[ ${IPREFIX} != *: ]]; then
_wanted sessions expl 'sessions' __tmux-sessions -S:

0 comments on commit 9db1831

Please sign in to comment.
Something went wrong with that request. Please try again.