aboutsummaryrefslogtreecommitdiffhomepage
path: root/share
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-04-04 21:52:23 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-04-04 21:52:23 -0700
commitfccf38a4d645614e31178f70f57eee2294cd4450 (patch)
tree543d45c59b4a2fa48e36ddfa983d4b1ee2af80dc /share
parent46edc49edee21aa4527500b28aaf7809e11fe557 (diff)
Don't pass 0 to seq because BSDs are dumb. Pipe tmux stderr to /dev/null
Diffstat (limited to 'share')
-rw-r--r--share/completions/tmux.fish20
1 files changed, 12 insertions, 8 deletions
diff --git a/share/completions/tmux.fish b/share/completions/tmux.fish
index 0ecfcb48..c44ef6c2 100644
--- a/share/completions/tmux.fish
+++ b/share/completions/tmux.fish
@@ -7,20 +7,24 @@ function __fish_tmux_clients --description 'connected clients'
end
function __fish_tmux_panes --description 'window panes'
- set -l panes (tmux list-panes -F "#S:#{window_name}.")
+ set -l panes (tmux list-panes -F "#S:#{window_name}." ^ /dev/null)
#fully qualified pane names
- for i in (seq (count $panes))
- echo "$panes[$i]"(math $i - 1)' session:window.pane'
- end
+ if count $panes
+ for i in (seq (count $panes))
+ echo "$panes[$i]"(math $i - 1)' session:window.pane'
+ end
+ end
#panes by themselves
- for i in (seq (count $panes))
- echo (math $i - 1)' pane'
- end
+ if count $panes
+ for i in (seq (count $panes))
+ echo (math $i - 1)' pane'
+ end
+ end
#windows by themselves
- tmux list-panes -F '#{window_name} window'
+ tmux list-panes -F '#{window_name} window' ^ /dev/null
end
#don't allow dirs in the completion list...