Appending to PROMPT_COMMAND
I have the following as my $PROMPT_COMMAND in .bashrc:
Code:
PROMPT_COMMAND=' Code:
export PROMPT_COMMAND="$PROMPT_COMMAND && ls" But if I change the following in .bashrc Code:
PROMPT_COMMAND=' I've echoed the value of $PROMPT_COMMAND in both cases and their output is exactly the same. Any tips? Thanks. |
It probably has to do with the fact that you already have quotes inside the original prompt command.
|
I am curious what you expect to happen?
If you did the following on the command line: Code:
PROMPT_COMMAND="$PROMPT_COMMAND && ls" The questions then becomes, what is processing $PROMPT_COMMAND? |
Quote:
http://tldp.org/HOWTO/Bash-Prompt-HOWTO/x264.html I've solved it, I had to put the last quote on the same line as the last fi Code:
PROMPT_COMMAND=' Now if someone can tell me why the previous version didn't work.. Code:
PROMPT_COMMAND=' |
Because the fi command needs to be terminated -- by a ; or by a newline.
|
All times are GMT -5. The time now is 07:07 PM. |