aboutsummaryrefslogtreecommitdiff
path: root/profile.dot.link
diff options
context:
space:
mode:
Diffstat (limited to 'profile.dot.link')
-rw-r--r--profile.dot.link57
1 files changed, 30 insertions, 27 deletions
diff --git a/profile.dot.link b/profile.dot.link
index 17312d6..957e37d 100644
--- a/profile.dot.link
+++ b/profile.dot.link
@@ -47,33 +47,35 @@ export CDPATH=".:~:$WORKPATH"
#done
# Based on http://superuser.com/questions/90535/how-do-i-turn-of-auto-echo-in-bash-when-i-cd
-cd() {
- if [ -z "$*" ]; then
- destination=~
- else
- destination=$*
- fi
+if [ "$0" = "bash" ]; then
+ cd() {
+ if [ -z "$*" ]; then
+ destination=~
+ else
+ destination=$*
+ fi
- # Check if its a project under CPATH
- cdpath=`command cd "${destination}" 2> /dev/null`
-
- # Got to folder
- command cd "${destination}" > /dev/null
-
- # Update screen title
- #
- # Doesn't deal about getting out of a project path
- # or if going into a project subfolder
- #
- #if [ ! -z "$cdpath" ] && [ ! -z "$STY" ]; then
- # folder="`basename $cdpath`"
- #
- # if echo "$PROJECTS" | grep -q "/$folder$"; then
- # # Got inside a project folder
- # stitle `basename $folder`
- # fi
- #fi
-}
+ # Check if its a project under CPATH
+ cdpath=`command cd "${destination}" 2> /dev/null`
+
+ # Got to folder
+ command cd "${destination}" > /dev/null
+
+ # Update screen title
+ #
+ # Doesn't deal about getting out of a project path
+ # or if going into a project subfolder
+ #
+ #if [ ! -z "$cdpath" ] && [ ! -z "$STY" ]; then
+ # folder="`basename $cdpath`"
+ #
+ # if echo "$PROJECTS" | grep -q "/$folder$"; then
+ # # Got inside a project folder
+ # stitle `basename $folder`
+ # fi
+ #fi
+ }
+fi
# Special cd: change folder and set title
scd() {
@@ -209,7 +211,8 @@ if [ -e "$HOME/apps/python" ]; then
fi
# Bash specifics
-if [ -n "$BASH_VERSION" ]; then
+#if [ -n "$BASH_VERSION" ]; then
+if [ "$0" = "bash" ]; then
# Command prompt if no system-wide custom prompt is available
if ! type command_prompt &> /dev/null && [ -e "$HOME/apps/shellprompt/prompt" ]; then
. $HOME/apps/shellprompt/prompt