]> git.mdlowis.com Git - projs/tide.git/commitdiff
tweaked working dir handling in tcmd to allow for some oddball cases like users overr...
authorMichael D. Lowis <mike.lowis@gentex.com>
Thu, 20 Jul 2017 14:19:32 +0000 (10:19 -0400)
committerMichael D. Lowis <mike.lowis@gentex.com>
Thu, 20 Jul 2017 14:19:32 +0000 (10:19 -0400)
tcmd

diff --git a/tcmd b/tcmd
index 38af1c99e9d5747af6215607f0f5c3975bbe5ce1..6be0131bd2a1bf141e12f16c7d5a6dd5d195dc68 100755 (executable)
--- a/tcmd
+++ b/tcmd
@@ -5,10 +5,12 @@ export PS1=":; "
 export PATH="$HOME/.config/tide/tools:$PATH"
 export EDITRCFILE="$HOME/.config/edit/editrc"
 export BASH_ENV="$EDITRCFILE"
+export PROMPT_COMMAND='tide_cd "$PWD"'
 
-function cd(){
-    command cd "$@" && echo -en "\033P$PWD\0"
-}
+# Override
+function tide_cd(){ echo -en "\033P$PWD\0"; }
+export -f tide_cd
+function cd(){ cd "$@" && tide_cd "$@"; }
 export -f cd
 
 edit(){