I used to keep my working directory when opening a new tab in gnome-terminal and want to restore this functionality. My research pointed me to sourcing /etc/profile.d/vte.sh
in my ~/.zshrc
(I use Z shell), however that does not change the problem, my new tabs still get opened in ~
.
How can I restore this functionality? It can be a dirty hack if necessary.
My versions
~$ uname -a
Linux konradslaptop2 3.17.2-1-ARCH #1 SMP PREEMPT Thu Oct 30 20:49:39 CET 2014 x86_64 GNU/Linux
~$ gnome-terminal --version
GNOME-Terminal 3.14.2
~$ zsh --version
zsh 5.0.7 (x86_64-unknown-linux-gnu)
My ~/.zshrc (minimal example)
. /etc/profile.d/vte.sh
# auto generated by .zsh installation
if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then
function zle-line-init () {
printf '%s' "${terminfo[smkx]}"
}
function zle-line-finish () {
printf '%s' "${terminfo[rmkx]}"
}
zle -N zle-line-init
zle -N zle-line-finish
fi
roxterm
, which is very similar tognome-terminal
, has this functionality by default. On Debian/Ubuntu, the package to install isroxterm-gtk3
orroxterm-gtk2
. – admirabilis May 20 '15 at 15:05