PS1 command! ?
My .bash_profile contains # First prompt is definitely PS1 (PSnumeral-one) PS1=\u@\h \w case 'id -u' in 0) PS1=$(PS1)# ;; *) PS1=$(PS1)S ;; esac My .bashrc contains: # same prompt lines from .bash_profile # note that it is PSnumeral-one not PSlowercaseL PS1=\u@\h \w case 'id -u' in 0) PS1=$(PS1)# ;; *) PS1=$(PS1)S ;; esac Yet on login I get this error message: bash: PS1: command not found and the prompt is S Why? and how can I fix this? -- Brian --- This message sent through Adam Internet Webmail http://www.adam.com.au To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-questions in the body of the message
Re: PS1 command! ?
On Thu, Feb 13, 2003 at 10:01:58AM +1030, [EMAIL PROTECTED] wrote: *) PS1=$(PS1)S ;; Yet on login I get this error message: bash: PS1: command not found $(foo) is the same as `foo`. It runs the command foo and uses its output. So the shell is looking for a command called PS1. You want ${PS1} (curly braces, not parentheses). I think your mind has been tainted by Makefiles which use $(foo) for variable substitution. -- Matthew Hunt [EMAIL PROTECTED] * Science rules. http://www.pobox.com/~mph/ * To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-questions in the body of the message
Re: PS1 command! ?
Quoting Matthew Hunt [EMAIL PROTECTED]: On Thu, Feb 13, 2003 at 10:01:58AM +1030, [EMAIL PROTECTED] wrote: *) PS1=$(PS1)S ;; Yet on login I get this error message: bash: PS1: command not found $(foo) is the same as `foo`. It runs the command foo and uses its output. So the shell is looking for a command called PS1. You want ${PS1} (curly braces, not parentheses). I think your mind has been tainted by Makefiles which use $(foo) for variable substitution. Well I'm blessed, said Pooh, being bothered. :-) So simple. Works too. Thanks. -- Brian --- This message sent through Adam Internet Webmail http://www.adam.com.au To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-questions in the body of the message