I want to create a key binding for the common task: open a new terminal window and open the program
ranger in it.
The obvious command would be something like that:
urxvt -e ranger
The important things work right out of the box. But in
ranger I want to use a different program called
fzf, and this program is not found. The error message
zsh:1: command not found: fzf.
Same result with
urxvt -e zsh -c ranger
When I already have an opened terminal and call
ranger in it, then
fzf can be called without any problems.
I took a look, and the path to the binary of
fzf gets added to
$PATH in my
.zshrc. So my assumption is that this never sources my
.zshrc, and it never gets added to the path.
There is an obvious fix for this (call
ranger using the full path
~/.fzf/bin/fzf), but this problem annoyed me quite a few times already, and I want a nice solution.
How can I open a new terminal, that sources
.zshrc and opens the program
One more observation that I don't understand:
I created a script
#!/usr/bin/zsh source ~/.zshrc ranger
and created the new terminal with:
urxvt -e myranger.sh
The terminal with ranger opens, but
fzf is still not in
What did I miss here?
Btw, this is not
urxvt specific. I also tested this with