From 1fe21928c76b04775f40b49b74ba91ebec1be40e Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Mon, 20 Feb 2023 19:08:57 -0800 Subject: feat(home/fish): move fish's code to external files It's easier to edit / debug / test the code that way. This also add a new function (`find-ssh-agent') to find or start a new ssh agent when a shell is started. --- home/shell/fish/interactive.fish | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 home/shell/fish/interactive.fish (limited to 'home/shell/fish/interactive.fish') diff --git a/home/shell/fish/interactive.fish b/home/shell/fish/interactive.fish new file mode 100644 index 0000000..4adcba8 --- /dev/null +++ b/home/shell/fish/interactive.fish @@ -0,0 +1,8 @@ +# Tmux on terminal start, unless we're in a SSH connection +if status is-interactive + if test -z "$SSH_CONNECTION" + if not tmux has-session 2>/dev/null; or test -z "$TMUX" + exec tmux new-session -A -s 0 + end + end +end -- cgit v1.2.3