aboutsummaryrefslogtreecommitdiffstats
path: root/zsh-fish/.zshrc
diff options
context:
space:
mode:
Diffstat (limited to 'zsh-fish/.zshrc')
-rw-r--r--zsh-fish/.zshrc12
1 files changed, 11 insertions, 1 deletions
diff --git a/zsh-fish/.zshrc b/zsh-fish/.zshrc
index 09669b6..6d543bc 100644
--- a/zsh-fish/.zshrc
+++ b/zsh-fish/.zshrc
@@ -1 +1,11 @@
-exec /usr/local/bin/fish
+SESSION_TYPE=local
+
+if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
+ SESSION_TYPE=remote/ssh
+else
+ case $(ps -o comm= -p "$PPID") in
+ sshd|*/sshd) SESSION_TYPE=remote/ssh;;
+ esac
+fi
+
+[ "$SESSION_TYPE" != "remote/ssh" ] && exec /usr/bin/fish