stepb / urxvt-tabbedex

Tabbed plugin for rxvt-unicode with many enhancements
75 stars 54 forks source link

feature request: keep current directory when opening a new tab #13

Open bzhb opened 12 years ago

bzhb commented 12 years ago

Thanks for this useful extension. I'm using it a lot. Though I miss one feature : When I open a new tab, I would like to be in the same directory than in the current tab rather than in the home directory (It could be an optional behavior with a parameter in .Xressources). I would be glad if this feature gets implemented.

carltonf commented 12 years ago

You might want to check a hack made by me. It depends on your window title are in the form of ".*:'". You can do this by setting some shell varaibles In Bash, for example, set:

export PROMPT_COMMAND='printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"'

It's a very dirty hack, but it works. The link: https://github.com/carltonf/urxvt-tabbedex/tree/experimental

PS: I failed in figuring out a better way to get the current shell's working directory. Any suggestions are welcome.

rubik commented 12 years ago

+1 on this. I would like to have an option in .Xresources to do this.

dwijnand commented 11 years ago

+1

alexdantas commented 10 years ago

+1

atweiden commented 10 years ago

A fork of urxvt-tabbedex linked to in this article incorporates @carltonf's suggestions. I incorporated critab on a fork of mina86/urxvt-tabbedex, which appears to be more actively developed than @stepb's:

https://github.com/atweiden/urxvt-tabbedex/tree/critabs

I hope it helps someone come up with a better solution.

See also: https://github.com/atweiden/urxvt-cwd-spawn (not working on bash at least)

mina86 commented 6 years ago

https://github.com/mina86/urxvt-tabbedex/tree/experimental has this feature implemented. As name suggests, it’s experimental so no guarantees on whether it actually works. There’s also no configuration of this feature as of now.