mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 22:59:15 +00:00
fish: rename tmux helper functions
This commit is contained in:
parent
d29efab025
commit
64d001455a
12 changed files with 24 additions and 24 deletions
16
nix/homeModules/common/fish/functions/tmux-last.fish
Normal file
16
nix/homeModules/common/fish/functions/tmux-last.fish
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
function tmux-last \
|
||||
--description "Toggle the last tmux session"
|
||||
|
||||
set tmux_last /tmp/TMUX_LAST
|
||||
if [ ! -f $tmux_last ]
|
||||
echo "Last session is not yet set"
|
||||
return 1
|
||||
end
|
||||
|
||||
set session_name (cat $tmux_last)
|
||||
|
||||
__tmux-register-session
|
||||
__tmux-maybe-create $session_name /tmp
|
||||
__tmux-attach-or-switch $session_name
|
||||
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue