bash dirtrim produces strange results with ~/foo/bar/var directory
- by queueoverflow
In some of my projects, I keep a var or a lib folder for runtime output and
external libraries. To keep my prompt rather short, I have the export
PROMPT_DIRTRIM=3 option in my .bashrc.
This works very well for most paths, but as soon as I have a /var in there, it
goes nuts like this (for ~/Projects/someproject/var/gfx):
~/.../gfxr/gfxr/gfxr/gfxr/gfxr/gfx
Interestingly, it works with /opt/lampp/lib
Is there some way to get around this?
Update
my .bashrc
my .bash_functions