urxvt -cd "/abs/path" not loading user zsh config

344 Views Asked by At

When I run urxvt -cd "/absolute/path" to start a terminal in a directory, it doesn't load my user zsh settings, it only loads the global ones in /etc.

Here's some context: Running latest stable versions of rxvt-unicode and zsh (on Arch Linux). I've got ZDOTDIR=~/.zsh in case that makes a difference (but I doubt it, since I tried symlinking ~/.zshrc to ~/.zsh/.zshrc.) If I just run urxvt then it works fine, but it's with the -cd flag that it messes up.

The reason I'm trying to do this is to start a terminal in the current location from Thunar AND have it read my user zsh configuration file. So if you know another way of doing this then that will work too.

1

There are 1 best solutions below

1
On

Try adding -ls to its options to run it as login shell, like:

urxvt -ls -cd "/absolute/path"

Otherwise it will spawn a subshell. If that doesn't work for you, it still possible to use:

urxvt -e /where/is/your/zsh -i -l -c "cd /where/you/want/it"

Or (regarding the Thunar custom action):

urxvt -cd %f -e /where/is/your/zsh -i -l