mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-03-18 08:05:45 +00:00
chore: general maintenance and cleanup (#306)
This commit is contained in:
9
config/fish/functions/.t.fish
Normal file
9
config/fish/functions/.t.fish
Normal file
@@ -0,0 +1,9 @@
|
||||
# Description: Open tmux session if not already open
|
||||
# Dependencies: tmux
|
||||
# Usage: .t
|
||||
function .t --wraps='tmux attach-session -t main || tmux new-session -s main' --description 'open tmux session'
|
||||
# Check if not in an SSH session and not already in a tmux session
|
||||
if test -z "$SSH_TTY"; and not set -q TMUX
|
||||
command tmux attach-session -t main || command tmux new-session -s main
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user