From 2abfe00a526ec3910ea9f2b781b7862cad584d10 Mon Sep 17 00:00:00 2001 From: Alexey Komarov Date: Mon, 6 Jul 2015 10:46:40 +0300 Subject: [PATCH] fish shell compatibility --- Terminal.sh | 5 ++++- iTerm.sh | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Terminal.sh b/Terminal.sh index 43761f5..e8f2ed1 100755 --- a/Terminal.sh +++ b/Terminal.sh @@ -1,6 +1,9 @@ #!/bin/bash -CD_CMD="cd "\\\"$(pwd)\\\""; clear" +CD_CMD="cd "\\\"$(pwd)\\\"" && clear" +if echo "$SHELL" | grep -E "/fish$" &> /dev/null; then + CD_CMD="cd "\\\"$(pwd)\\\""; and clear" +fi VERSION=$(sw_vers -productVersion) if (( $(expr $VERSION '<' 10.7.0) )); then IN_WINDOW="in window 1" diff --git a/iTerm.sh b/iTerm.sh index 8f9b1fd..feea414 100755 --- a/iTerm.sh +++ b/iTerm.sh @@ -1,6 +1,9 @@ #!/bin/bash CD_CMD="cd "\\\"$(pwd)\\\"" && clear" +if echo "$SHELL" | grep -E "/fish$" &> /dev/null; then + CD_CMD="cd "\\\"$(pwd)\\\""; and clear" +fi VERSION=$(sw_vers -productVersion) if (( $(expr $VERSION '<' 10.7) )); then