On Tue, Jul 13, 2010 at 11:19:34AM +0800, Clark J. Wang wrote:
> My PS1 depends much on PROMPT_COMMAND. For example, my PROMPT_COMMAND will
> trim very long $PWD to a shorter one (depends on the window size of current
> terminal):
> 
> [r...@server ~/directory/loooooooong/very/a/is/this] #    ---->
> [r...@server ~/.../very/a/is/this] #

The same thing could be done with a command substitution inside PS1.

Reply via email to