From: Silvio Rhatto Date: Sun, 2 Jan 2022 17:35:36 +0000 (-0300) Subject: Fix: implement SETCDPATH workaround X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=fa14d9efa93250f809ffd31fead67188f1b9af3e;p=rhatto%2Fdotfiles%2Fprofile.git Fix: implement SETCDPATH workaround --- 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