[TAG] Just Bad and Wrong... yet cool
Jimmy O'Regan
jimregan at o2.ie
Fri Oct 14 14:32:06 MSD 2005
Raj shekhar wrote:
> in infinite wisdom Jimmy O'Regan spoke thus on 10/14/05 06:09:
>
>> Rick Moen wrote:
>>
>>> "bash is terrifying me again":
>>> http://www.livejournal.com/users/mendel/128965.html
>>>
>>> Bash pseudo-sockets: Oh my!
>>>
>>> followed by:
>>> "Dude, you've got a smiley in your prompt."
>>
>>
>>
>> Followed by:
>>
>> :) fishsticks$ false
>> :( fishsticks$
>
>
> How did he do that. I want something like that too. If anyone knows,
> do tell.
>
``
jimregan at jimmy ~
$ echo $PS1
\[\033]0;\w\007 \033[32m\]\u@\h \[\033[33m\w\033[0m\] $
jimregan at jimmy ~
$ smiley () { if [ $? == 0 ]; then echo ':)';else echo ':(';fi; }
jimregan at jimmy ~
$ PS1="\$(smiley) \h$ "
:) jimmy$ false
:( jimmy$ true
:) jimmy$
''
More information about the TAG
mailing list