From: Michael D. Lowis Date: Thu, 20 Jul 2017 14:19:32 +0000 (-0400) Subject: tweaked working dir handling in tcmd to allow for some oddball cases like users overr... X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=a4f37288b1a171ba4bb4aedf0b10ba7ffceb4f0c;p=projs%2Ftide.git tweaked working dir handling in tcmd to allow for some oddball cases like users overriding cd or PROMPT_COMMAND. Or wanting tide in a different working dir than the shell --- diff --git a/tcmd b/tcmd index 38af1c9..6be0131 100755 --- 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(){