![](https://seccdn.libravatar.org/avatar/8f4a97fd774fd986502d2413639dcdea.jpg?s=120&d=mm&r=g)
Hi, On Wed, 4 Feb 1998 wtopa@ix.netcom.com wrote:
Hubert Thank you for the reply. I appreciate your concern with the way I went about getting my prompt to work. I think I follow your reasoning except for the "pwd -P". I can't find any reference to the "-P" in regards to pwd. I may have done something correct in my .bash_profile because I do not see the same results as yu show. My running of your test yields the following.
VT5 wtopa-SuSE:~$ cp FUNNY sad cp: FUNNY: No such file or directory VT5 wtopa-SuSE:~$ echo $? 1 VT5 wtopa-SuSE:~$ unset PS1 cp FUNNY sad cp: FUNNY: No such file or directory echo $? 1
Sorry about the lack of a prompt, you understand. As I view the above results, I do not see the problem occuring that prompted your concern, or have I mis-understood you?
You have no system command in your PS1 variable. In this case it works correctly. In my example, the `pwd` did overwrite the return code from the cp command. For the difference between `pwd` and `pwd -P` look at this example: Mandelbrot:/home/alex/mantel > md -p a/b/c Mandelbrot:/home/alex/mantel > ln -s a/b/c d Mandelbrot:/home/alex/mantel > cd d Mandelbrot:/home/alex/mantel/a/b/c > pwd /home/alex/mantel/d Mandelbrot:/home/alex/mantel/a/b/c > pwd -P /home/alex/mantel/a/b/c Mandelbrot:/home/alex/mantel/a/b/c > `pwd -P` shows the "real" location. We did it this way due to demand from many of our customers. After having done so, we noticed the problem with the overwritten return code and switched to using the PROMPT_COMMAND.
Wayne
Hubert -- To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e