Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Use Growl to monitor long-running shell commands' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Use Growl to monitor long-running shell commands
Authored by: stevev on Oct 12, '07 06:15:21AM

as for #1, i use a different technique which may be of use to you in this scenario. specifically, the steps below do not use PROMPT_COMMAND.

1. take the contents of your newPWD command and put them in an executable shell script somewhere in your path.

2. change PS1 to use something along the lines of "\$(<shell name here>)". for example, my PS1 is "\\h:\$(trim-pwd.bash)\$ \[\e]0;\H:\w\a\]" (as an aside, the escape sequence is there to change the title of terminal to the working directory)

and that's it. you now should have the path trimmed without using the PROMPT_COMMAND environment variable. i can post the contents of "trim-pwd.bash" if anyone needs it.

hth



[ Reply to This | # ]