[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Interesting shell prompts (bash or otherwise)



On Sat, 2004-05-29 at 23:12, Dean Hamstead wrote:

> has anyone got an intersting shell prompt or a link or something
> 
> maybe a little more jazzy than... dean@meleana:~$
> 
> i know i just need edit ~/.bash_profile or /etc/profile
> im just not very creative today =)

Sure, if USEFUL is what you want. Put the exit code in it.

    PS1='\u $? \w\$ '

Also, use the TTY name for your xterm title:

    case $TERM in
    xterm*)
        /usr/local/bin/title `tty | colrm 1 5`
        ;;
    *)
        ;;
    esac

The session ID would be a decent choice as well.
Here's the /usr/local/bin/title program:

#!/usr/bin/perl
print "\033]0;@ARGV\007";




Reply to: