On 2/19/13 10:09 AM, Chris Down wrote: >> Bash can be improved by making it check for changes on each return.
If you think this is true, use the existing mechanisms to test your hypothesis. PROMPT_COMMAND='cd $PWD || cd ${PWD%/*}' will do much of what you say you want. You can modify that to fit your needs: redirect stderr to /dev/null, use cd -P, make it into a shell function that loops until cd succeeds, add something to print the new current directory if the second cd succeeds, and so on. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/