Shell dirtracking again

Trey Jackson posted this code to handle directory tracking in a shell.

Trey, I don’t know if you know, but you’ve basically reinvented dirtrack.el. It should be included with your Emacs distribution. See my recent posts on the topic.

2008/08/19
Previously On Atomized:

Discussion

Heh, as usual, Emacs folks have solved what I need solved, many times over. Thanks for the pointers.

Trey Jackson
2008/08/19

Now that I look at dirtrack, I think I prefer the implementation on my post – only because I don’t want the full path in my prompt (b/c it often gets very deep). Perhaps I’ll see if I can patch dirtrack to do what I want…

Trey Jackson
2008/08/19

Really? Showing the full prompt has been standard behavior in every shell I’ve ever used.

Or are you talking about how it flashes the current directory into the minibuffer when it changes? I believe there’s a way to toggle that.

If you’re truly against the path in $PS1, you might be able to use dirtrack-directory-change-hook to truncate the directory name in the prompt.

Ian
2008/08/19

Participate