mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-03-02 19:59:55 +00:00
chore(config): simplify fish open-tmux function
Signed-off-by: Ismo Vuorinen <ismo@ivuorinen.net>
This commit is contained in:
@@ -2,9 +2,8 @@
|
|||||||
# Dependencies: tmux
|
# Dependencies: tmux
|
||||||
# Usage: open-tmux
|
# Usage: open-tmux
|
||||||
function open-tmux --wraps='tmux attach-session -t main || tmux new-session -s main' --description 'open tmux session'
|
function open-tmux --wraps='tmux attach-session -t main || tmux new-session -s main' --description 'open tmux session'
|
||||||
if test -z "$SSH_TTY"
|
# Check if not in an SSH session and not already in a tmux session
|
||||||
if not set -q TMUX
|
if test -z "$SSH_TTY"; and not set -q TMUX
|
||||||
tmux attach-session -t main || tmux new-session -s main
|
command tmux attach-session -t main || command tmux new-session -s main
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user