diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2022-01-02 14:35:36 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2022-01-02 14:35:36 -0300 |
commit | fa14d9efa93250f809ffd31fead67188f1b9af3e (patch) | |
tree | deee0ae0f9d08adf9ce210647bd786c73b5ca139 | |
parent | c28b98d31d88beaae5b3a23fe8bb1696b0c60c71 (diff) | |
download | profile-fa14d9efa93250f809ffd31fead67188f1b9af3e.tar.gz profile-fa14d9efa93250f809ffd31fead67188f1b9af3e.tar.bz2 |
Fix: implement SETCDPATH workaround
-rw-r--r-- | profile.dot.link | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/profile.dot.link b/profile.dot.link index b7b6470..100d34f 100644 --- a/profile.dot.link +++ b/profile.dot.link @@ -129,7 +129,13 @@ export PATH=$PATH export WORKPATH="$HOME/file:$HOME/data:$HOME/code:$HOME/apps:$HOME/apps/dotfiles/modules" # See http://www.caliban.org/bash/#bashtips -export CDPATH=".:$HOME:$WORKPATH" +if [ "$SETCDPATH" != "false" ]; then + if [ -z "$CDPATH" ]; then + export CDPATH=".:$HOME:$WORKPATH" + else + export CDPATH=".:$HOME:$WORKPATH:$CDPATH" + fi +fi # Default editor #if [ ! -z "$DISPLAY" ]; then |