From a4f37288b1a171ba4bb4aedf0b10ba7ffceb4f0c Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Thu, 20 Jul 2017 10:19:32 -0400 Subject: [PATCH] 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 --- tcmd | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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(){ -- 2.49.0