]> gitweb.fluxo.info Git - rhatto/dotfiles/profile.git/commitdiff
Fix: implement SETCDPATH workaround
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 2 Jan 2022 17:35:36 +0000 (14:35 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 2 Jan 2022 17:35:36 +0000 (14:35 -0300)
profile.dot.link

index b7b6470977f3906210ad9fbf4763f3f2a50471b0..100d34f2df838661e5a1941f7756fd52565bc5a3 100644 (file)
@@ -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