mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 21:03:12 +00:00
Don't pass 0 to seq because BSDs are dumb. Pipe tmux stderr to /dev/null
This commit is contained in:
parent
46edc49ede
commit
fccf38a4d6
1 changed files with 12 additions and 8 deletions
|
@ -7,20 +7,24 @@ function __fish_tmux_clients --description 'connected clients'
|
||||||
end
|
end
|
||||||
|
|
||||||
function __fish_tmux_panes --description 'window panes'
|
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
|
#fully qualified pane names
|
||||||
for i in (seq (count $panes))
|
if count $panes
|
||||||
echo "$panes[$i]"(math $i - 1)' session:window.pane'
|
for i in (seq (count $panes))
|
||||||
end
|
echo "$panes[$i]"(math $i - 1)' session:window.pane'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
#panes by themselves
|
#panes by themselves
|
||||||
for i in (seq (count $panes))
|
if count $panes
|
||||||
echo (math $i - 1)' pane'
|
for i in (seq (count $panes))
|
||||||
end
|
echo (math $i - 1)' pane'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
#windows by themselves
|
#windows by themselves
|
||||||
tmux list-panes -F '#{window_name} window'
|
tmux list-panes -F '#{window_name} window' ^ /dev/null
|
||||||
end
|
end
|
||||||
|
|
||||||
#don't allow dirs in the completion list...
|
#don't allow dirs in the completion list...
|
||||||
|
|
Loading…
Reference in a new issue