bash dirtrim produces strange results with ~/foo/bar/var directory
Posted
by
queueoverflow
on Ask Ubuntu
See other posts from Ask Ubuntu
or by queueoverflow
Published on 2011-06-20T17:27:25Z
Indexed on
2011/06/21
0:30 UTC
Read the original article
Hit count: 465
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
© Ask Ubuntu or respective owner