justjanne / powerline-go

A beautiful and useful low-latency prompt for your shell, written in go
GNU General Public License v3.0
2.73k stars 268 forks source link

powerline-go prompt does not display current working directory. instead displays a stale directory. #218

Open slester87 opened 4 years ago

slester87 commented 4 years ago

slester  C02YQ1Z4LVCJ  ~  Development  $  pwd /Users/slester/Development slester  C02YQ1Z4LVCJ  ~  Development  $  cd slingshot_tools/ slester  C02YQ1Z4LVCJ  ~  Development  $  pwd /Users/slester/Development/slingshot_tools slester  C02YQ1Z4LVCJ  ~  Development  $  Screen Shot 2020-07-31 at 11 34 21 AM

plato79 commented 4 years ago

Yes, I too saw this issue.. I'm using bash on High Sierra...

justjanne commented 3 years ago

One possible reason might be that powerline-go isn't executed after each command properly, another reason would be that $PWD isn't properly updated.

Could you try to verify both?

plato79 commented 3 years ago

$PWD is updated.. But I think the problem is that powerline-go is not executed after every command.

I can see my PS1 is:

declare -x PS1="\\[\\e[38;5;250m\\]\\[\\e[48;5;240m\\] \\u \\[\\e[48;5;238m\\]\\[\\e[38;5;240m\\]\\[\\e[0m\\]\\[\\e[38;5;250m\\]\\[\\e[48;5;238m\\] \\h \\[\\e[48;5;31m\\]\\[\\e[38;5;238m\\]\\[\\e[0m\\]\\[\\e[38;5;15m\\]\\[\\e[48;5;31m\\] ~ \\[\\e[48;5;236m\\]\\[\\e[38;5;31m\\]\\[\\e[0m\\]\\[\\e[38;5;15m\\]\\[\\e[48;5;236m\\] \\\$ \\[\\e[0m\\]\\[\\e[38;5;236m\\]\\[\\e[0m\\] "

I did try to change export PS1 line in my profile but couldn't work out the problem.