chpwd_functions+=(__vte_ps1)
nor
chpwd_functions+=(__vte_osc7)
added to my .zshrc have no effect, also how do I check the version of vte, it's not a command, mine says vte command not found if I try vte --version
the other vte I find appears to be a directory
I'm having the same problem and I'd like to understand why your solution does not work for me.
So it looks like I have vte 0.34.5
So I put this in my .zshrc
chpwd_functions+=(__vte_osc7)
But that doesn't seem to have any effect.
Are chpwd_functions and the changes to PS1 supposed to be used together?
Any help would be appreciated.
chpwd_functions+=(__vte_ps1) # or replace __vte_ps1 with __vte_osc7 after updating vte to 0.34.5
. /etc/profile.d/vte.sh
export PS1='\[$(__vte_ps1)\]'$PS1
However, it does not work properly for zsh. I tried to export PS1 like this
export PS1='%{$(__vte_ps1)%}'$PS1
or
export PS1=$PS1'%{$(__vte_ps1)%}' # to avoid conflicting with printing last error code.
It would print a weird string for every prompt when working in directories start with ".", such as ".config".
Any workaround? Thank you very much.
UPDATE:
solution at #2