You are not logged in.
Hi, all. I need some help.
As you may know, gnome-terminal 3.8 no longer remembers working directory when openning new tabs or new windows.
Some good guys in this thread suggested a workaround for bash.
. /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
Last edited by stoolye (2013-05-06 03:26:13)
Offline
I found the solution. Seems upstream has fixed it in git.
For now, we can put this line to .zshrc
chpwd_functions+=(__vte_ps1) # or replace __vte_ps1 with __vte_osc7 after updating vte to 0.34.5
[1]https://git.gnome.org/browse/vte/commit … c1c48c4c70
Last edited by stoolye (2013-05-06 03:26:50)
Offline
Hi stoolye,
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.
Last edited by Avatar (2013-05-22 06:16:25)
Offline
Avatar, did you ever manage to solve this as I have the same problem, neither
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
Offline
ahh, fixed the problem, it required setting my terminal to a login shell (see here for how to: http://rvm.io/integration/gnome-terminal)
Offline