Reputation: 2791
Bear with me for a sec while I explain the motivation for my question.
I've tmux set so that it shows the current working directory on the tmux status line. This works fine except in the following scenario:
While on a bash shell, I fire up ipython. On ipython, I change directory to some other place in my disk (doing 'cd some_place'). This works in the sense that I'm cd'ed to that directory, but the tmux status line still shows the original directory from which I fired ipython as the current working directory, instead of the one that I'm now.
I know that this is no bug, tmux is just showing me the original directory, all the "cd's" that I launch from ipython are transparent to that hosting shell.
My question is: Can you think of a way to make tmux get the current working directory from ipython instead of the original (hosting) shell from which it was launched?
Thanks in advance for all your help.
Upvotes: 0
Views: 1031
Reputation: 6794
Drawing from this answer, you could manually update the status using a command like the one provided in the linked answer:
!tmux set -qg status-left "#S #P $(pwd)"
Includes the !
for ipython shell calls. This is, however, a manual action. Maybe there is a way to run it automatically.
Upvotes: 0