feat(tmux): add fish completions
This commit is contained in:
parent
3e8ff2e064
commit
b8be6a3a4e
6 changed files with 77 additions and 22 deletions
1
modules/programs/tmux/tmux-attach/completions.fish
Normal file
1
modules/programs/tmux/tmux-attach/completions.fish
Normal file
|
|
@ -0,0 +1 @@
|
|||
complete -c ta -f -a '(tmux list-sessions -F "#{session_name}" 2>/dev/null)'
|
||||
5
modules/programs/tmux/tmux-attach/script.fish
Normal file
5
modules/programs/tmux/tmux-attach/script.fish
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
set selected (tmux list-sessions -F '#{session_name}' 2>/dev/null | fzf1 $argv)
|
||||
if not test -n "$selected"
|
||||
exit 1
|
||||
end
|
||||
tmux-switch "$selected"
|
||||
Loading…
Add table
Add a link
Reference in a new issue