mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-07 07:09:15 +00:00
ref(nix): drop fish legacy support
This commit is contained in:
parent
074e78751a
commit
1bec5057c7
21 changed files with 2 additions and 2 deletions
22
nix/home/common/fish/functions/tmux_attach.fish
Normal file
22
nix/home/common/fish/functions/tmux_attach.fish
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
function tmux_attach --description "attach to existing tmux sessions"
|
||||
|
||||
# abandon if tmux not running
|
||||
set tmux_running (pgrep tmux)
|
||||
if [ -z "$tmux_running" ]
|
||||
return 0
|
||||
end
|
||||
|
||||
set selected (tmux list-sessions -F "#{session_name}" | fzf)
|
||||
if [ -z $selected ]
|
||||
return 0
|
||||
end
|
||||
|
||||
set -U TMUX_LAST (tmux display-message -p '#S')
|
||||
|
||||
if [ -z $TMUX ]
|
||||
tmux attach-session -t $selected
|
||||
else
|
||||
tmux switch-client -t $selected
|
||||
end
|
||||
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue