Bash PWD Shortening
- by dlibby00
I'm looking for a bash function that will shorten long path names to keep my PS1 variable from getting excessively long. Something along the lines of:
/this/is/the/path/to/a/really/long/directory/i/would/like/shortened
might end up as:
/t../i../t../p../to/a/r../l../d../i/w../like/shortened
something that the took the path and a maximum acceptable number of characters to shorten to would be perfect for my .bashrc file.