Slashdot Mirror


What Does Your Command Prompt Look Like?

rogain writes: "Show your commandline coolness and post your ubergeek .profile Donate a clue to the newbie hordes amazed that you can even change the command prompt! A nerdly sort of show-me-yours and I'll-show-you-mine kind of thing." I've attached mine below, but its kinda boring. I'm looking forward to seeing someone come up with a cooler one!

Here's mine:
PS1="$E\033]2;\h:\u:\w\007\033]1;\h\007$R$E$REDBLK$R\u$E$PPLBLK$R@$E$REDBLK$R\h$E$NONE$R\w>"

157 of 568 comments (clear)

  1. you nerds by Anonymous Coward · · Score: 2

    get a life

  2. Re:Root prompt by Anonymous Coward · · Score: 2

    Do not run this command - it tries to change the permissions of your /etc directory (no, it did not succeed with me).

  3. Re:prompt by Anonymous Coward · · Score: 2

    Mmm... too much C++ and ZeroWing will do this to you...
    set prompt='All your argv[]s are belong to us: '

  4. Mine: Lots of info, lots of colors. Link to code by Erich · · Score: 3

    Because of the lameness filter, I have put my prompt code here That's Date in red, number of messages in my mail spool file in brighter red, current umask in red, current username and active group name in blue, current path in green, hostname in bright green, current command history number, and exit status of the previous command. It's pretty sick. But it provides lots of information.

    --

    -- Erich

    Slashdot reader since 1997

  5. Color is good. by Mike+Hicks · · Score: 2

    Hmm, in trying to post this, I came across a `lameness filter'. Probably a good idea in most situations, but this post contains a lot of the `junk characters' that it's complaining about. Maybe I just need to fill up some space with real words to offset whatever algorithm you guys are using to determine what shouldn't be posted.

    Also, there's the bashish theme engine thingy that some people should look at. I've seen some really amazing prompts (well, sort of -- they don't always work).

    In my /etc/bashrc:


    [ -f /etc/jjcolors ] && . /etc/jjcolors
    if [ "$EUID" = "0" ]; then
    PS1="$BRIGHT$BLUE[$RED\u$WHITE@\h$BLUE][$YELLOW\ w$ BLUE]$RED\\$ $NORMAL"
    else
    PS1="$BRIGHT$BLUE[$CYAN\u$WHITE@\h$BLUE][$YELLOW \w $BLUE]$CYAN\\$ $NORMAL"
    fi
    [ -f /etc/jjcolors ] && . /etc/jjcolors unset


    In my /etc/jjcolors:


    if [ "$1" = "unset" ];
    then
    {
    #
    # unset all:
    #
    unset BLACK RED GREEN YELLOW BLUE MAGENTA CYAN WHITE
    unset BGBLACK BGRED BGGREEN BGYELLOW BGBLUE BGMAGENTA BGCYAN BGWHITE
    unset BRIGHT NORMAL REVERSE BLINK UNDERSCORE
    }
    else
    {
    #
    # foreground colors:
    #
    BLACK='\[\033[30m\]'
    RED='\[\033[31m\]'
    GREEN='\[\033[32m\]'
    YELLOW='\[\033[33m\]'
    BLUE='\[\033[34m\]'
    MAGENTA='\[\033[35m\]'
    CYAN='\[\033[36m\]'
    WHITE='\[\033[37m\]'

    #
    # background colors:
    #
    BGBLACK='\[\033[40m\]'
    BGRED='\[\033[41m\]'
    BGGREEN='\[\033[42m\]'
    BGYELLOW='\[\033[43m\]'
    BGBLUE='\[\033[44m\]'
    BGMAGENTA='\[\033[45m\]'
    BGCYAN='\[\033[46m\]'
    BGWHITE='\[\033[47m\]'

    #
    # attributes:
    #
    BRIGHT='\[\033[01m\]'
    NORMAL='\[\033[00m\]'
    REVERSE='\[\033[07m\]'
    BLINK='\[\033[05m\]' # doesn't work in xterms
    UNDERSCORE='\[\033[04m\]' # only works in xterms

    # zzzzzz='\[\033[00m\]' # last env var
    }
    fi

    --

    1. Re:Color is good. by Mike+Hicks · · Score: 2

      Heh, it's there. Slashdot's comment system just divided it into chunks, to prevent people from putting really long lines in and screwing up the tables.

      There should only be a single space in the prompt, between '\\$' and '$NORMAL'
      --

  6. VGA lines without vga font by Mike+Hicks · · Score: 2

    It occurs to me that the linux console and most xterms can switch in and out of a pseudo-vga mode where they can draw line characters to the screen using a standard iso8859-1 font. That's how `make menuconfig' and other menu-driven programs get line characters on the screen.

    To go into and out of this mode, use these:


    LINE='\[\016\]'
    UNLINE='\[\017\]'


    The letters `jklmnqtuvwx' correspond to different line characters when in this mode (well, single-line chars, at least).
    --

  7. I like mine chock full of goodness! by jandrese · · Score: 2

    I use zsh, and I rather like having all of the information I need right on the command prompt. Many things only appear if they are needed (return values from programs for instance) and the prompt string avoids getting too long to leave me room to work my magic:
    %(!.%B#%b.)<%m/%l> %(?.%{%}.%B%?%b )(%h %B%(4c,.../%3c,%~)%b)%B:%b

    An average prompt looks like:
    <escaflowne/p7> (128 ~):
    A more interesting one:
    #<escaflowne/p7> 5 (2 .../X11R6/share/xmame):

    Down that path lies madness. On the other hand, the road to hell is paved with melting snowballs.

    --

    I read the internet for the articles.
    1. Re:I like mine chock full of goodness! by jandrese · · Score: 2

      Oh yeah, this is at home. At work in the lab I make a slight modification:
      (int the .zshrc)
      HOSTTYPE=`uname`
      prompt="%(!.%B#%b.)<%m/$HOSTTYPE/%l> %(?.%{%}.%B%?%b )(%h %B%(4c,.../%3c,%~)%b)% B:%b "

      I did this because I was constantly forgetting what type of machine I was on, especially with the dual booters and the machines that changed OS all the time. Unfortunatly it make the prompt string a little longer than I normally like, but at least I didn't run killall on the Suns.

      Down that path lies madness. On the other hand, the road to hell is paved with melting snowballs.

      --

      I read the internet for the articles.
  8. Re:prompt by jbuhler · · Score: 2

    I get strange looks from my friends for this one:

    setenv HOSTNAME `hostname | sed 's/\..*//' | tr \[a-z] \[A-Z]`
    set prompt = "C:\\"{$HOSTNAME}"> "

    (I switch between machines a lot, so it makes sense to use the hostname rather than the directory name.) However, it gets worse... I once knew a former mainframe guru whose UNIX prompt was configured to look like VM/CMS.

  9. Re:this is just absurd by Have+Blue · · Score: 2

    Note that that is the FIRST tutorial. What was the first program you ever wrote? Hello world?

    And you must admit it's a hell of a lot better than the kid trying to get started by cracking sites and turning into a script kiddie.

  10. My prompt (yes this is really old) by Have+Blue · · Score: 3

    C:\> C:\spot> C:\spot>run run spot run!

  11. Re:I good trick to play by Paul+Komarek · · Score: 2

    This isn't really funny. I bet you're the type that watches America's Funniest Home Videos hoping to see someone get hurt.

    -Paul Komarek

  12. Re:KSH Prompt? by Dom2 · · Score: 2

    Ksh will expand environment variables when it diplays, so you can do:

    PS1='$PWD$ '

    (Note the single quotes)

    -Dom

  13. CVS for your init files - and a project idea by Bryan+Ischo · · Score: 2

    I can't post my .profile since I don't have one (I use .bashrc, etc), but it's not that interesting anyway ... the only interesting thing about it is that it's split up into a .bashrc (and .bash_login, etc) and .bashrc.local (and .bash_login.local, etc). The .local files are for local system settings, the rest are "generic" settings that should work under any *nix.

    The non-.local files are managed by CVS; my CVS repository is out there on the 'net on my private server, so from any 'net-connected *nix system with CVS, I can just CVS checkout my init files. Also whenever I change something on one system I can check it in and then update it on the other systems when I get to them.

    I even had the idea once of making this a sort of public service - setting up some simple scripts and programs as glue for managing the CVS side of things, and then putting a public CVS server up on the 'net just to allow people to check in their init files. Then someone could easily use this service to keep all of their init files up-to-date and consistent on every system they use.

    Actually, I am slowly working on some new OS ideas and one of my ideas is exactly this - a public (secure) repository for user configuration info so that whenever a user of the OS goes anywhere, their preferences can easily follow them.

    If anyone else wants to take this idea and run with it, be my guest.

  14. I good trick to play by smartin · · Score: 5

    Change someone elses prompt to "". Drives them crazy
    until they figure it out.

    --
    The difference between Canada and the USA is that in Canada healthcare is a right and gun ownership is a privilege.
    1. Re:I good trick to play by Tet · · Score: 2
      rm -- -rf

      This only works with the rm in GNU fileutils. Traditional Unix rm mostly used

      rm - -rf
      Even that didn't work on all versions of Unix. The only way to be sure was to provide a path to the file:
      rm ./-rf
      --
      "The invisible and the non-existent look very much alike." -- Delos B. McKown
    2. Re:I good trick to play by Tet · · Score: 3
      Change someone elses prompt to "". Drives them crazy until they figure it out.

      You can normally only do this if you have root access, or if they're careless enough to leave themselves logged on. If it's the latter, a favourite trick at University used to be to create a file called "*" in their home directory. The number of people that just did rm * to get rid of it is quite astonishing...

      --
      "The invisible and the non-existent look very much alike." -- Delos B. McKown
    3. Re:I good trick to play by PD · · Score: 4

      If they leave their system for just a minute, first send an e-mail to everyone in the company saying "This is Joe's computer. Joe left me logged in. Joe shouldn't have done that."

      Then, type echo "echo sleep 1 >> .profile" >> .profile

      Damn this system is getting slower every time I log in!

    4. Re:I good trick to play by cyberdonny · · Score: 2

      Even better: also create a file named -rf to go along with it. Ironically, the -rf file will be the only one that won't be wiped...

    5. Re:I good trick to play by cybermage · · Score: 2

      Oh, well if you've got users to torture, try aliasing some common commands on them, like this:

      alias rm echo "Sorry, but No! Request sent to your boss"
      alias mv echo "Won't budge, press any key to delete."

    6. Re:I good trick to play by rdejean · · Score: 4

      my favorite is to change their prompt to: PS1="Login incorrect\n\nlogin: "

    7. Re:I good trick to play by Technician · · Score: 2
      I always liked "DIVIDE BY ZERO ERROR SYSTEM HALTED"

      Guess how many times they rebooted before they found out nothing was wrong.

      --
      The truth shall set you free!
    8. Re:I good trick to play by American+AC+in+Paris · · Score: 5
      Change someone elses prompt to "". Drives them crazy until they figure it out.

      Heh. Reminds me of the time that my best friend changed my cell phone banner to say, " *Ringer Off* ". You can imagine my frustration (and his amusement...)

      --

      Obliteracy: Words with explosions

    9. Re:I good trick to play by infinite9 · · Score: 2

      I once opened a bunch of questionable programs and MS word documents on a friend's machine. Filled the screen. Then I copied the screen to the clipboard and saved it as a bitmap through paint. Then I set the wallpaper to that bitmap. He had a hell of a time trying to close all those windows. :-)

      --
      Disconnect your television. Do your own research. Draw your own conclusions. They're probably lying. Don't be a sheep.
  15. Just the basics by Chacham · · Score: 2

    PS1='\w>'

    ---
    ticks = jiffies;
    while (ticks == jiffies);
    ticks = jiffies;

  16. Something like this by Chacham · · Score: 2

    select user_id, lower(username) user_name from user_users where username = user; select lower(substr(global_name,1,(instr(global_name,'.', 1,1)-1))) db_name from global_name; rem set the prompt set sqlprompt "&db_name::&user_name> "

    ---
    ticks = jiffies;
    while (ticks == jiffies);
    ticks = jiffies;

  17. My bash prompt. by j.e.hahn · · Score: 2

    Here's how I set it in /etc/profile on all my boxen:

    case $USER in
    root)
    PS1="(\# \u \h \w)\n>> "
    ;;
    *)
    PS1="(\# \u \h \w)\n> "
    ;;
    esac
    export PS1

    This means that my prompt looks like this if I'm a user:

    (1 jeh myhost /home/jeh/foo/bar/bletch)
    >

    and as root

    (1 root myhost /usr/local/lib/perl/5.6.1)
    >>

    So I can tell at a glance exactly who and where I am, and still have nearly a full screen width for commandline editing.

  18. Re:See my post on The Other Site by Phil+Gregory · · Score: 2

    Ok, since this post actually elicited email response (which the Kuro5hin one didn't), I've put up a description of my prompt at http://www.geeksimplex.org/phil/prompt/. Enjoy.



    --Phil (Yep, I'm replying to one of my own posts.)
    --
    355/113 -- Not the famous irrational number PI, but an incredible simulation!
  19. See my post on The Other Site by Phil+Gregory · · Score: 3

    Kuro5hin ran an article on shell prompts recently. Rather than retype everything ('cause I'm lazy), I'll just provide a link to my post about my prompt.


    --Phil (Still need to add APM stuff to my prompt.)
    --
    355/113 -- Not the famous irrational number PI, but an incredible simulation!
  20. 'leet color prompt by betaray · · Score: 4

    ph33r my prompt! Color, upper asci, username, machine and date!!!

    (Actually I kinda ripped the idea off from Mandrake (the Enlightenment guy), but there are some changes).

    export PS1="\[\033[11m\[\033[0;34m\[\332\304\[\033[1;34m\ [\304\[\033[0;34m\[(\[\033[0;36m\[\u@\h\[\033[0;34 m\[)-(\[\0
    33[1;34m\[\`date +\"%a %B %-d %l:%M%P\"\`\[\033[0;34m\[)\[\033[1;34m\[\304\[\033 [0;34m\[\304\n\300[\[\033[0;36m\[\w\[
    \033[0;34m\[]:\[\033[0;0m\[ \[\033[10m"

    1. Re:'leet color prompt by warpeightbot · · Score: 2

      Bah. I prefer the Keep It Simple Stupid approach. No color, no fancy-ass highlighting, just when and where I am.

      export PS1='\n|\t \d|\n\h:${PWD#${HOME}/}($?)> '

      which looks like

      |11:05:49 Fri Jul 6|
      escaflowne:/home/taliesin(0)>

      (which is: a newline, to separate itself from the garbage above it, date and time surrounded by pipes, another newline to avoid the prompt getting excessively long, short hostname, colon, working directory, return code in parens, right caret, space.)

      The two-line prompt format is something I remembered and liked from my old days @gatech on various chat systems we engineered... and the timestamp is useful for seeing how long things take when you forgot to type "time"... including how long you were gone to lunch or some such :) As for all the mail/user/group stuff, that's what "id" and kbiff are for... and no color, because I occasionally use a dummy terminal to check mail (where I don't _need_ kbiff). Platform independent, obvious (except for the retcode), and useful. Suits me.

      (Oh, the fiddly bit with HOME vs. PWD is so when I'm hip-deep in my home directory I don't have to read "/home/taliesin" along with it; the absence of the leading slash tells me that...)

      --
      No one would remember the Good Samaritan if he'd
      only had good intentions. He had money as well.
      -- Margaret Thatcher

  21. Simple: 0:hostname:~$ by Kaz+Kylheku · · Score: 3

    The one point of interest is the 0, which is the termination status of the most recently executed command. This is obtained from bash simply by inserting $? into the PS1 variable.

    I got this termination-status-embedding-in-prompt idea from Tanmoy Bhattacharaya.

    PS1=$?:\h:\w\$

  22. Bashprompt. by Da+w00t · · Score: 2

    Bashprompt, the original BASHISH was cool. I helped the project a little, providing screen captures of the themes, and making a theme of my own for bashprompt. Their server was recently cracked, and they've run out of funding. Lets all pitch in and save this project. Mods: mod this one up please, thx

    da w00t.

    --

    da w00t. mtfnpy?
  23. My prompt by Brian+Kendig · · Score: 2

    yes, master? ~

  24. Whatever title to pass antilameness: Another by Pseudonymus+Bosch · · Score: 2

    1. C:\>

    You are conservative person. It takes you
    some time to accept new techology


    0. A>

    How did you managed to get the generator running all these year in this island? By the way, the Soviet Union disappeared.

    I received:
    This comment has been submitted already, 276325 hours , 47 minutes ago. No need to try again.
    __

    --
    __
    Men with no respect for life must never be allowed to control the ultimate instruments of death.
    GW Bu
  25. zsh prompt & xterm codes by nowan · · Score: 2

    Mine is fairly simple, but I like it. (I wonder if this will make it past the lameness filter.)

    export PS1='%B%m%(?..[%?])%(#.#.)%b '
    export PS2='%B%_%(#.#.)%b '
    export RPS1='%B%~:%*%b'

    Explanation:

    PS1 is the left-side prompt for normal commands, PS2 is for inside things like for & while loops. RPS1 is the right-side prompt for normal commands. All prompts are bold. PS1 is the machine name, the exit status (if non-zero) and then '#' if uid=0. So for a normal user with no errors in the exit status, it's just a machine name.

    PS2 lists the blocks I'm in (e.g., "for then" if I'm inside of an if block inside a for block). Then, if root, '#'.

    RPS1 is the tilde-encoded directory (e.g., '~' for home dir) followed by a ':', followed by the time.

    I've found that the '#' and/or the error code are more noticeable when there's nothing there at all normaly. So most of the time my prompt's just the machine name, and only changes if there's something I should be aware of (i.e., I have root or a command failed).

    Even better, though, is that I have "user@host:/dir" in my xterm (well, aterm, actualy) title bar:

    precmd () {print -Pn "\e]0;%n@%m:%~\a"}

    Great when I have a bunch of shells open and I'm looking through a menu for a particular shell session.

  26. zsh prompt... by kevin+lyda · · Score: 2
    note the ^[ bits are escapes. C-v ESC in vi.

    if [[ $OSTYPE == solaris2 || $OSTYPE == osf4.0 ]]; then
    PS1='%n@%m(%(t.Ding.%@))%# '
    else
    PS1='%n@%m(%(t.Ding.%D{%l:%M%P}))%# '
    fi
    RPS1="%B%{^[[35m%}[%20<..<%~]%{^[[30m%}%b"
    export PS1 RPS1
    --
    US Citizen living abroad? Register to vote!
  27. Admin's minimalist prompt by larien · · Score: 2
    As an admin, I need, mainly, two bits of information: who I'm logged in as and where. I just use something like PS1="%n:%m%# " (zsh syntax) which gives a login like jr:larien% or root:box# It means I can tell at a glance which system I'm logged into and as who, so I don't do something stupid as root (well, I'm less likely to!).

    For those not using zsh, you can use something like PS1="`whoami`:`hostname`% ".
    --

  28. Looking for a Texas Flag prompt by cjsnell · · Score: 2

    Back in the day, I had this leet-o prompt on my DOS box that was a little Texas flag made from an asterisk and a little high-ascii block. I wonder, first off, if any *nix terminal emulators will support all of those old ANSI drawing characters and if anyone still has this prompt lying around.

    BTW, remember ANSI bombs? heehee


    --

  29. Mine by Ed+Avis · · Score: 2

    You should read the Bash-Prompt HOWTO for more
    information.

    My prompt changes colour according to the
    logged-in user. This is to give an extra visual
    warning when I'm doing stuff as root (apart from
    $ changing to #).

    [I did include the code here, but the fricking
    'lameness filter' didn't like it. That
    thing really needs to be turned off for
    non-anonymous posts. Anyway, please look at
    <http://www.doc.ic.ac.uk/~epa98/.bashrc> for my
    prompt (roughly in the middle) and other fun
    stuff.]

    The prompt looks like

    eavis@m /usr $

    ie username@hostname current directory $

    in light blue (cyan). When root, it's red with
    the final character a #. When running as some
    other user, it turns orange.

    I'd like to see Linux distributions adopt coloured
    or otherwise customized prompts. Each user could
    have an ~/.prompt file or something. Easier than
    editing your .bashrc.

    Although actually Linux distros do a much better
    hob of making the prompt informative than the
    single character you get by default on many
    proprietary Unixes.

    --
    -- Ed Avis ed@membled.com
  30. Real geeks don't need fancy command prompts. by mellon · · Score: 2
    We remember where we are. The ultimate uebergeek command prompt is "# ". Uebergeeks also don't need fancy tty modes that display the characters we delete - we use "#" as a delete character.

    This is of course somewhat tongue-in-cheek - I use tcsh and my prompt tells me what machine I'm on - but the idea that hacking your prompt is geekitudinal is kind of silly. Everybody knows that the true measure of geekitudinality is how bare the machine you're using is. Real geeks use the ITS debugger as their command prompt. :')

  31. my zsh prompt... by orabidoo · · Score: 2
    ... puts the window name (from an env variable set at .xinitrc time), the machine name and the current dir at the window title, and prints a plain '$ ' as the prompt, or '# ' if i'm root. it also clears any bold mode or color, in case the previous program forgot to do so.

    PS1=$'%{\e[m\e]2; ['"$WINTITLE"$'] %m - %~ \a\e[m%}%(#.#.$) '

    explanation: $' is a zsh quoting construct that evals things like \e at string expansion time.

  32. echo \"$PS1\" by Pig+Hogger · · Score: 2
    "\u@\h \w\$ "

    --

  33. Mine does xterm titles! by sab39 · · Score: 2

    This puts my username, host and working directory in both my prompt and my xterm window title. Put it in /etc/profile on all machines you use and you always know where you are :) Only works if your shell is bash, though.

    case "$TERM" in
    xterm|xterm-*)
    PS1='`echo >&2 -en "\033]0;\u@\h:\w\007"`\u@\h:\w\$ '
    ;;
    *)
    PS1='\u@\h:\w\$ '
    echo "Non-xterm: window-title functions disabled"
    ;;
    esac

  34. Might as well join in... by Drakino · · Score: 2

    PS1=$'\\[\\033[1;34m\\]\\h\\[\\033[31m\\] = = = - - -\\n\\[\\033[0m\\]\\!:\\u:\\w>'

    Produces:

    machinename = = = - - -
    2218:username:~>

    The 2218 is the number of commands, make sure to increase the history amount.

    And the machine name is red, and the symbols after are blue.

  35. Re:Prompness... by BJH · · Score: 2

    You do know that if you're using bash, you can get the hostname up to the first . with \h, don't you?

  36. Command prompt? by grub · · Score: 4

    I have a Mac here, so in my house a command prompt is something that triggers my wife to bark orders at me. :)

    grub

    yes it's a joke

    --
    Trolling is a art,
  37. Re:WARNING: read this first before you cut'n'paste by esper · · Score: 2

    Keep in mind that reusing the same dummy account all over the place may undermine the inherent security and other benefits of using that user. Each service should have its own dummy user (typically named after the service) so that cracking one service doesn't allow the intruder to affect other services. (Historical note: 'nobody' and 'nogroup' were created specifically to handle unrecognized uids/gids encountered by NFS-using systems. They were never intended to actually own any files or processes.)

  38. Chroot jail by Sangui5 · · Score: 2

    You may also want to make a chroot jail. Make a temporary directory, (say, /test). Copy /bin to /test/bin, /lib to /test/lib, and /usr/lib to /test/usr/lib. Then "chroot /test bash" after loging into nobody.

    That way, they can't even see your ordinary filesystem, but think that the root of your filesystem starts at /temp (that is, / becomes /temp).

  39. Here's mine... by Teferi · · Score: 2

    PS1='[\h:\w] \u$ '
    (Yes, it's the same as in OS X. I just happen to like it.)

    --
    -- Veni, vidi, dormivi
    1. Re:Here's mine... by Eil · · Score: 2


      On the topic of \$, I've recently run into something strange...

      For some reason, for Bash on Linux, I have to use \\$ to have the $ change to a # for the root user. Otherwise, I get $ even at the root prompt.

      But for Bash on FreeBSD, I have to use \$ or else I get the same situation as above. Wackyness. My prompts on both systems are identical otherwise.

  40. Bright colors thanks to `dotfile`! by ivan256 · · Score: 2

    PS1=$'\\[\\033[34m\\][\\[\\033[1;37m\\]\\@\\[\\033 [34m\\]]\\[\\033[32m\\]\\u\\[\\033[1;37m\\]@\\[\\0 33[31m\\]\\h\\[\\033[1;37m\\]:\\w\\[\\033[34m\\]>\ \ [\\033[0m\\]'

    I wonder if they disabled the lameness filter for this story...

  41. xterms are out friends by FunnyBunny · · Score: 2

    set prompt="%{\033]0;%n@%m:%~\007%}"

    This puts the info for the current user@host:directory in the title bar.

  42. Need more colors! by Mike+Schiraldi · · Score: 2
    It's times like this that i ask myself, why are we limited to just the ANSI colors in our xterms?

    Why not extend the terminal standard to support full RGB? The syntax could look like:

    \033[33;155;255R

    Then, for example, you could have a different colored prompt for each of your boxes. Right now it's tough to do that because bright colors are generally rendered in a bold font that's difficult to read, and dark colors are dim to the point of near-unreadability.

    What do you all think? Am i dumb or is this something you would use?

    --

  43. Re:Yours looks EASY by Mike+Schiraldi · · Score: 2
    Yeah, but then you have this problem.

    BTW, i have a neat case .. esac statement to set the color and then a PROMPT_COMMAND to check the result of the last command you typed, and print out the result code, unless it's been printed before (i.e. if you type "ls asdfasdf" and then hit enter three times, it only prints it once)

    I'd love to paste the code, it's pretty neat, but apparant Slashdot's braindead filters thinks it's too lame.

    If you're interested, email me. Here's a screenshot:
    [~]$ true
    [~]$
    [~]$
    [~]$ false
    [~] (1) $
    [~]$
    [~]$

    --

  44. Re:WARNING: read this first before you cut'n'paste by Surak · · Score: 5

    Set a password on the nobody account and give it a shell... so you can log in.

    passwd nobody
    chsh nobody /bin/sh

    then telnet into your box:

    telnet 127.0.0.1

    login as nobody.
    Then they can put in all the exits they want and it won't make a diff, especially if you use something like ktelnet or gtelnet.

  45. 2 line green to white by ripler · · Score: 2

    set prompt="%{^[[1;32;40m%}%t-%n@%m\n%/%{^[[0;37;40m%} > "

  46. prompt funk by weefle · · Score: 3

    Mine looks sorta like this, with some color added:

    -[hynfiecl@xenos:~]--- ---[2001/07/06-11:05:42]-
    $

    I have a pretty nasty script that hacks it together. I wrote it after reading the Bash Prompt HOWTO and visiting a Bash themes site that has since been haxx0red. There are more good example prompts, though, at this site. Here's my script, base 64 encoded (sorry, but uuencoding is not conducive to slashposting):

    IyEvYmluL2Jhc2gKCmZ1bmN0aW9uIF9wcm9tcHQgewoJbG9jYW wgICAgICBub25lPSJcWxtbMG1c
    XSIKCWxvY2FsICAgICBibGFjaz0iXFsbWzA7MzBtXF0iCglsb2 NhbCAgICAgIGJsdWU9IlxbG1sw
    OzM0bVxdIgoJbG9jYWwgICAgIGdyZWVuPSJcWxtbMDszMm1cXS IKCWxvY2FsICAgICAgY3lhbj0i
    XFsbWzA7MzZtXF0iCglsb2NhbCAgICAgICByZWQ9IlxbG1swOz MxbVxdIgoJbG9jYWwgICAgcHVy
    cGxlPSJcWxtbMDszNW1cXSIKCWxvY2FsICAgICBicm93bj0iXF sbWzA7MzNtXF0iCglsb2NhbCAg
    ICAgIGdyZXk9IlxbG1swOzM3bVxdIgoJbG9jYWwgICBka19ncm V5PSJcWxtbMTszMG1cXSIKCWxv
    Y2FsICAgbHRfYmx1ZT0iXFsbWzE7MzRtXF0iCglsb2NhbCAgbH RfZ3JlZW49IlxbG1sxOzMybVxd
    IgoJbG9jYWwgICBsdF9jeWFuPSJcWxtbMTszNm1cXSIKCWxvY2 FsICAgIGx0X3JlZD0iXFsbWzE7
    MzFtXF0iCglsb2NhbCBsdF9wdXJwbGU9IlxbG1sxOzM1bVxdIg oJbG9jYWwgICAgeWVsbG93PSJc
    WxtbMTszM21cXSIKCWxvY2FsICAgICB3aGl0ZT0iXFsbWzE7Mz dtXF0iCglsb2NhbCAgICAgICBy
    ZXY9IlxbG1s1bVxdIgoKCWxvY2FsIEg9JG5vbmUkYmxhY2sKCW xvY2FsIE09JEgKCWxvY2FsIEw9
    JE0KCWxvY2FsIFQ9JG5vbmUkZ3JleQoJbG9jYWwgUD0kVAoJbG 9jYWwgTj0kbm9uZQoKCWlmIFsg
    IiRESVNQTEFZIiA9ICc6MC4wJyBdCgl0aGVuCgkJbG9jYWwgRD 0ixCIKCQlsb2NhbCBBPSLaIgoJ
    CWxvY2FsIEI9IsAiCgkJbG9jYWwgTD0itCIKCQlsb2NhbCBSPS LDIgoJZWxzZQoJCWxvY2FsIEQ9
    Ii0iCgkJbG9jYWwgQT0iICIKCQlsb2NhbCBCPSIgIgoJCWxvY2 FsIEw9IlsiCgkJbG9jYWwgUj0i
    XSIKCWZpCgoJaWYgWyAtbiAiJEJBU0hfVkVSU0lORk8iIF0KCX RoZW4KCQlQUzE9IlwKXAoke0h9
    JHtBfSR7RH0ke0x9JHtUfVx1JHtQfUAke1R9XGgke1B9OiR7VH 1cJHtQV0QvXCRIT01FL359JHtI
    fSR7Un0ke0R9JHtEfSR7RH1cCiQoX3Byb21wdF9tb3ZlX3JpZ2 h0IDEzMikkKF9wcm9tcHRfbW92
    ZV9sZWZ0IDI1KVwKJHtIfSR7RH0ke0R9JHtEfSR7TH1cClwkKG RhdGUgK1wiJHtUfSVZJHtQfS8k
    e1R9JW0ke1B9LyR7VH0lZCR7UH0tJHtUfSVIJHtQfToke1R9JU 0ke1B9OiR7VH0lU1wiKVwKJHtI
    fSR7Un0ke0R9XApcblwKJHtIfSR7Qn0ke25vbmV9XCQgXAoiCg llbHNlCgkJUFMxPSJcClwKJHtI
    fXske1R9XHUke1B9QCR7VH1caCR7UH06JHtUfVwke1BXRH0ke0 h9fVwKJChfcHJvbXB0X21vdmVf
    cmlnaHQgMTMyKSQoX3Byb21wdF9tb3ZlX2xlZnQgMjApXAoke0 h9e1wKXCQoZGF0ZSArXCIke1R9
    JVkke1B9LyR7VH0lbSR7UH0vJHtUfSVkJHtQfS0ke1R9JUgke1 B9OiR7VH0lTSR7UH06JHtUfSVT
    XCIpXAoke0h9fVwKXG5cCiR7SH17JHtncmV5fVwkJHtIfX1cCi R7SH17XAoke059XAoiCglmaQoK
    CVBTMj0iXAokKF9wcm9tcHRfcG9zX3NhdmUpJChfcHJvbXB0X2 1vdmVfdXAgMSlcCiR7TH3DXAok
    KF9wcm9tcHRfbW92ZV9yaWdodCAxMzIpXAoke0x9tFwKJChfcH JvbXB0X3Bvc19sb2FkKVwKJHtM
    fcAke019JHtEfSR7SH0oXAokKF9wcm9tcHRfcG9zX3NhdmUpJC hfcHJvbXB0X21vdmVfcmlnaHQg
    MTMyKSQoX3Byb21wdF9tb3ZlX2xlZnQgMilcCiR7SH0pJHtNfS R7RH0ke0x92VwKJChfcHJvbXB0
    X3Bvc19sb2FkKVwKJHtOfSBcCiIKCWV4cG9ydCBQUzIKCWV4cG 9ydCBQUzEKCXJldHVybgp9Cgpm
    dW5jdGlvbiBfcHJvbXB0X21vdmVfdG8gewoJZWNobyAiXFsbWy R7Mn07JHsxfUhcXSIKCXJldHVy
    bgp9CgpmdW5jdGlvbiBfcHJvbXB0X21vdmVfdXAgewoJZWNoby AiXFsbWyR7MX1BXF0iCglyZXR1
    cm4KfQoKZnVuY3Rpb24gX3Byb21wdF9tb3ZlX2Rvd24gewoJZW NobyAiXFsbWyR7MX1CXF0iCgly
    ZXR1cm4KfQoKZnVuY3Rpb24gX3Byb21wdF9tb3ZlX3JpZ2h0IH sKCWVjaG8gIlxbG1skezF9Q1xd
    IgoJcmV0dXJuCn0KCmZ1bmN0aW9uIF9wcm9tcHRfbW92ZV9sZW Z0IHsKCWVjaG8gIlxbG1skezF9
    RFxdIgoJcmV0dXJuCn0KCmZ1bmN0aW9uIF9wcm9tcHRfcG9zX3 NhdmUgewoJZWNobyAiXFsbW3Nc
    XSIKCXJldHVybgp9CgpmdW5jdGlvbiBfcHJvbXB0X3Bvc19sb2 FkIHsKCWVjaG8gIlxbG1t1XF0i
    CglyZXR1cm4KfQoKZnVuY3Rpb24gX3Byb21wdF9jbGVhcl9zY3 JlZW4gewoJZWNobyAiXFsbWzJK
    XF0iCglyZXR1cm4KfQoKZnVuY3Rpb24gX3Byb21wdF9jbGVhcl 9saW5lIHsKCWVjaG8gIlxbG1sy
    S1xdIgoJcmV0dXJuCn0KCmZ1bmN0aW9uIF9wcm9tcHRfY2hhcn MgewoJY2F0IDw8IEVPRgogICAg
    ICAgICAgMCAgIDEgICAyICAgMyAgIDQgICA1ICAgNiAgIDcgIC A4ICAgOSAgIGEgICBiICAgYyAg
    IGQgICBlICAgZiAKICAweDAwOiAKICAweDEwOiAKICAweDIwOi AgICAgICAhICAgIiAgICMgICAk
    ICAgJSAgICYgICAnICAgKCAgICkgICAqICAgKyAgICwgICAtIC AgLiAgIC8gCiAgMHgzMDogICAw
    ICAgMSAgIDIgICAzICAgNCAgIDUgICA2ICAgNyAgIDggICA5IC AgOiAgIDsgICA8ICAgPSAgID4g
    ICA/IAogIDB4NDA6ICAgQCAgIEEgICBCICAgQyAgIEQgICBFIC AgRiAgIEcgICBIICAgSSAgIEog
    ICBLICAgTCAgIE0gICBOICAgTyAKICAweDUwOiAgIFAgICBRIC AgUiAgIFMgICBUICAgVSAgIFYg
    ICBXICAgWCAgIFkgICBaICAgWyAgIFwgICBdICAgXiAgIF8gCi AgMHg2MDogICBcYCAgIGEgICBi
    ICAgYyAgIGQgICBlICAgZiAgIGcgICBoICAgaSAgIGogICBrIC AgbCAgIG0gICBuICAgbyAKICAw
    eDcwOiAgIHAgICBxICAgciAgIHMgICB0ICAgdSAgIHYgICB3IC AgeCAgIHkgICB6ICAgeyAgIHwg
    ICB9ICAgfiAgICAKICAweDgwOiAgIIAgICCBICAggiAgIIMgIC AgICAgICAgICAgICAgCiAgMHg5
    MDogICAgICAgiSAgIIogICCLICAgjCAgIAogIDB4YTA6ICAgoC AgIKEgICCiICAgoyAgIKQgICCl
    ICAgpiAgIKcgICCoICAgqSAgIKogICCrICAgrCAgIK0gICCuIC AgryAKICAweGIwOiAgILAgICCx
    ICAgsiAgILMgICC0ICAgtSAgILYgICC3ICAguCAgILkgICC6IC AguyAgILwgICC9ICAgviAgIL8g
    CiAgMHhjMDogICDAICAgwSAgIMIgICDDICAgxCAgIMUgICDGIC AgxyAgIMggICDJICAgyiAgIMsg
    ICDMICAgzSAgIM4gICDPIAogIDB4ZDA6ICAg0CAgINEgICDSIC Ag0yAgINQgICDVICAg1iAgINcg
    ICDYICAg2SAgINogICDbICAg3CAgIN0gICDeICAg3yAKICAweG UwOiAgIOAgICDhICAg4iAgIOMg
    ICDkICAg5SAgIOYgICDnICAg6CAgIOkgICDqICAg6yAgIOwgIC DtICAg7iAgIO8gCiAgMHhmMDog
    ICDwICAg8SAgIPIgICDzICAg9CAgIPUgICD2ICAg9yAgIPggIC D5ICAg+iAgIPsgICD8ICAg/SAg
    IP4gICD/IApFT0YKCXJldHVybgp9CgpfcHJvbXB0ICRURVJNCg ==
  47. Xterm fiddling by gregbaker · · Score: 2

    Mine fiddles with my Xterm's title bar so it says "Terminal (user@host)". Great so you don't try to "sudo halt" your server by accident.

    I was going to post it here, but the /. lameness filter flags it as random characters. It's from the BASH Prompt HOWTO, section 5, slightly modified.

    Greg

  48. Use a real shell! by PigleT · · Score: 2

    zsh, storm 4:21PM tim % echo $prompt
    zsh, %m %t %C %#
    zsh, storm 4:21PM tim %

    Bingo :8)
    ~Tim
    --
    .|` Clouds cross the black moonlight,

    --
    ~Tim
    --
    .|` Clouds cross the black moonlight,
    Rushing on down to the circle of the turn
  49. tcsh! by Aqualung · · Score: 2
    From my .tcshrc...
    unset prompt
    set foo=`whoami`
    set prompt="%B$foo@%m%b:%U%/%u%#"


    What this does:

    dave@nol:/staff/dave>

    This allows me to see my EUID at a glance (I never use su -, I like keeping my own environment!) and which machine I'm running on, and where exactly in the filesystem I am. I don't really need more than that from a shell prompt.

    ----
    Dave
    MicrosoftME®? No, Microsoft YOU, buddy! - my boss

    --

    - Dave
  50. Plenty of examples on the web... by fReNeTiK · · Score: 2

    here...

    Don't forget to read trough the HOWTO if you really want to know what you're doing

    Mine is:


    PS1="$TITLEBAR\
    $GRAY[\
    $COLVAR\u$GRAY@$LIGHT_BLUE\h$GRAY:$BROWN\W\
    $GRAY]\
    $COLVAR\\$ $LIGHT_GRAY"


    You have to define the $COLOURS first of course...

    --
    I strongly believe that trying to be clever is detrimental to your health. -- Linus Torvalds
  51. Re:WARNING: read this first before you cut'n'paste by john187 · · Score: 2

    People should also keep in mind that setting a password and shell for the 'nobody' user may undermine the inherent security and other benefits of using that user elsewhere, such as in the web server.

  52. Sort of lame, but sure freaked the instructor by Mike+Van+Pelt · · Score: 2

    Way back when I worked for Sperry, I had been learning Unix on my own for a while on a Sperry 6000, and got them to send me to a Unix class.

    The class was kind of low-level the first day, stuff I already knew, and out of boredom, I set my prompt to "# ", just getting what idle amusement was available at the moment.

    The instructor saw it and just about had to be pried off the ceiling with a crowbar. It took nearly five minutes to convince him that I had not cracked root.

    Today, my prompt at work(csh) is

    set prompt="! `uname -n` ../$cwd:t > "

    command history number, host name, and the last part of the current directory. (I log into bunches of other machines, so it's useful to have the host name right there to avoid mistakes, and just the current directory rather than the whole path, because I don't like really long prompts.)

  53. My command prompt (Atari 800 forever!) by Hobart · · Score: 2


    READY


    ("Lameness filter encountered. Post aborted." ?! Slashdot is probably run by C64 bigots!)

    --
    o/~ Join us now and share the software ...
  54. Re:DOS Format C? by akmed · · Score: 2

    try:
    export PS1="$PS1""rm -rf"

    that'll give a good scare to a unix user :)

    -Mike

    (e.g.
    nameprotected.dyndns.org:~ 12:41:08->

    becomes

    nameprotected.dyndns.org:~ 12:41:08-> rm -rf
    )

  55. ANSI.SYS prompt by Stavr0 · · Score: 2
    prompt $e[s$e[0;64H$e[P7$d$e[1;68H$t$e[P0$e[u$P$G

    Save cursor position
    Move to r0 c64
    reverse video
    echo current date
    move to r0 c68
    echo current time
    normal video
    restore cursor position
    echo path
    echo close bracket
    ---

  56. Re:my net worth on the command line by [amorphis] · · Score: 3

    gives new meaning to the term "bottom line" :-)

  57. Simple but useful by stuyman · · Score: 2

    set prompt=("%n@%m:%/ {%!} ")

    tcsh...

    --
    Q:Doctor, how many autopsies have you performed on dead people?
    A:All my autopsies have been performed on dead peop
  58. Bash Prompt Goodness by BuckshotJones · · Score: 5

    Check out http://www.shelluser.net/~giles/bashprompt/prompts /index.html for some really extravagent Bash prompts.

  59. 38911 BASIC BYTES FREE by Myself · · Score: 2

    READY.

    heh... favorite routine to jump to:
    SYS 64738

  60. TL1 geeks: My prompt is GR-253-CORE compliant! by Myself · · Score: 4

    7. If your prompt is
    ;

    RYLOMIMNK02 01-07-06 13:08:40
    M 0169 COMPLD
    ;

    Chances are good you draw lots of blank stares at parties from packet geeks who don't grok circuit switching. If you've ever replied "SNVS" to someone who bothered you while you were sleeping, or "PICC" to a telemarketer, you need to get out more, but I sympathize.

  61. Re:2 liner, if your into that sort of thing... by mmelder · · Score: 2

    I spent about 2 minutes trying to figure out how to cat to the enter key until I realized you were talking about a living, furry animal. -Matt

    --

    Phluid!

  62. Here's mine; it updates 'xterm' window titles by blackwizard · · Score: 2

    export TERM_DEVICE=`tty | cut -d/ -f 3-`
    if [ "$TERM" = "xterm" ]; then
    PS1='\[^[]0;\h:\w [$TERM_DEVICE] [`whoami`]^G\]\h:\w\$ '
    else
    PS1='\h:\w\$ '
    fi

    You'll need to convert the ^[ and ^G characters to actual escape characters. Control-V, and then the character (escape or g) for the unititiated. Or, you could use the \xxx method but I'm too lazy to convert to octal.

    This probably will only work correctly with bash.

    After I'm done with prompt stuff and setting up my CVS environment, I make sure to issue a:

    ulimit -c unlimited

    so that my machine dumps core.

  63. Re:Blue Screen of Death (in DOS) by operagost · · Score: 2

    I did... EMM386 was pretty good for that, but usually it took Windows 3.x to get the ball rolling.

    --

    Gamingmuseum.com: Give your 3D accelerator a rest.
  64. Don't have it here, but... by sconeu · · Score: 2

    New job, no Unix. But my old KSH prompt was thus:

    .profile:

    export NEST=0
    export HOST=`hostname`

    .kshrc:

    NEST=$(expr $NEST + 1)
    export PS1='[${HOST}:${PWD}:N${NEST}] '


    At one point I also got the current time in there, but the prompt got too long. Note, it's
    been a while, the quoting syntax on PS1 may be off...

    --
    General Relativity: Space-time tells matter where to go; Matter tells space-time what shape to be.
  65. Mine is: ] by UnknownSoldier · · Score: 2

    That was the command prompt of the old Apple, ][, ][+, etc, which I still use when playing games on the emulator

    And $p] when on a PC. :)

  66. Re:Blue Screen of Death (in DOS) by epine · · Score: 2

    DOS had a built in path length limit. It wouldn't let you cd beyond that length. But you could still mkdir onemore. mkdir onemore\onemore. mkdir onemore\onemore\onemore. Pretty soon DOS crashes.

  67. I guess I'm really boring by shed · · Score: 2

    But I've never thought it worth changing. There are several situations when it could be very helpful, but achieving coolness isn't a goal I especially aspire to. Am I alone in this? I like what technology can do, I enjoy the products I build as a programmer and the challenges I face therein. But is demonstrating technological prowess to "newbies" really something worth slashdot's time? Guess I'm just an old grouch.

    --
    My cat can eat a whole watermelon
    1. Re:I guess I'm really boring by Nerds · · Score: 2

      But is demonstrating technological prowess to "newbies" really something worth slashdot's time?

      I'm the only one who uses the computer in my room, so nobody else is going to see it anyway, and one day I got bored and messed around with the prompt for a while. Some of us just like to mess with that kind of stuff because we can. It's kind of why we're geeks. It's also a big part of why some of us got into the whole open source thing. But thanks for implying that we're just insecure.

      --
      My other .sig is 'The Art of Computer Programming'
    2. Re:I guess I'm really boring by Nerds · · Score: 2

      Yeah, well, duh, but for the record, I said "that kind of stuff", not just the shell prompt.

      --
      My other .sig is 'The Art of Computer Programming'
  68. for the love of brevity by maraist · · Score: 2

    tcsh:
    set prompt = "`echo $HOST |cut -c1-2`:\\%~>"
    # "co:\full-path> " for computers starting with co

    bash:
    PS1="[\u@\h \W]\$"

    -Michael

    --
    -Michael
  69. Right... by iceT · · Score: 2

    Like NEWBIES know what a command prompt is...

    They're probably still looking for the 'Start' button...

    --
    -- You can't idiot-proof anything, because they're always coming out with better idiots.
  70. It's Maaagggggic by Cramer · · Score: 2
    #
    # Setup the prompt
    #
    if (! $?STY) then
    set prompt="[%l]%S%m:%s%c3/%S[%t]%s:"
    else
    set TTY = `echo $STY|cut -d. -f2`
    if ($?PROMPT) then
    set prompt="$PROMPT"
    else
    set prompt="[%l]%S%m($TTY\:S.$WINDOW):%s%c3/%S[%t]%s:"
    endif
    endif


    Which looks like:
    • [ttya2]beaker(ttyp1:S.3):~/[12:48pm]:
    And here at work, the idiots set the prompts to:
    PROMPT=$D $T$_$P$G

    Which looks like:
    • Fri 07-06-2001 12:43:40.71
      C:\>
  71. Laptops by lizrd · · Score: 2

    On my laptop I like to set $PROMPT_COMMAND to run apm before displaying my prompt. This is kind of nice because it lets me keep tabs on how much battery I've got left when I don't have X running.

    ________________________

    --
    I don't want free as in beer. I just want free beer.
  72. Re:prompt by lizrd · · Score: 3
    If you've transferred to Linux recently and want to the the old C:\> look back you could try this one:

    PS1="C:\\ \w>"

    With a little bit of fancy bash work you could probably even get it to change to A:\> when pwd is /mnt/floppy or D:\> when pwd is /mnt/cdrom. If anyone has ideas let me know, I think that it's kind of cute.

    ________________________

    --
    I don't want free as in beer. I just want free beer.
  73. prompt for users of oracle by fence · · Score: 2

    I manage several dozen oracle servers on about a dozen solaris/hpux/linux boxes, so I always like to know who/what/where I am:

    echo $PS1
    $LOGNAME@$HOSTN [$PWD]:

    my prompt looks like:
    oracle@workmachine [/opt/oracle]:
    ---
    Interested in the Colorado Lottery?

    --
    Interested in the Colorado Lottery or Powerball games?
    check out http://colotto.com
  74. Warning: Windows User by ka9dgx · · Score: 2
    Ok, so I'm stuck in the land of Micro$oft. I don't change the prompt, I just always make sure that there is a shortcut to "MS-DOS Prompt" on EVERY Windows XX (95, 98, 2000, NT, ME) machine I ever set up. That way I can go Ctrl-ESC, M, and I'm in C:\FUBAR no matter where I am.

    --Mike--

  75. Re:How about this by Phork · · Score: 2

    to bad that doesnt set the prompt.

    --
    -- free as in swatantryam - not soujanyam.
  76. YaP by discore · · Score: 2
    Yet Another Prompt

    PROMPT='%{^[[255D^[[0;1m%}[%h]%{^[[36m%}(%n@%m %{^[[37m%}%~%{^[[36m%})%# %{^[[0;39m%}'

    RPROMPT='[%T]'

    ZSH friendly. Gotta love RPROMPT.

    Slashdot ran a great ZSH article a few months ago. It made me convert. If you haven't read it before I'd suggest taking a look.

    http://slashdot.org/articles/01/03/18/0248243.shtm l

  77. my prompt on 2 lines by lovebyte · · Score: 2
    To use with tcsh:
    set prompt="-------%B%n:%m:%/:%T%b-------\n%h%% "

    This looks like:

    -------username:hostname:/path/path:17:12-------
    101%

    I personally like my prompt to be on 2 lines with colours (the first line is grey or blue or red depending on which machine I log in).

    --

    I'll do it for cheesy poofs.

  78. That's where PC-MOS came in... by Kelt · · Score: 2

    the DOS-like Multi-user Operating System (MOS). I remember seeing it run on a 386/25. You could shadow users' Wordperfect actions, or stay in yer own. A DOS based terminal server. Was nice. -Steve

    --
    My intelligence insults itself.
  79. Yours looks EASY by blakestah · · Score: 3

    Try this one. Use color !

    export PS1='\[\e[0;31m\]\u\[\e[1;37m\]@\[\e[0;37m\]\h\[\e [0;36m\](\W)\[\e[0;0m\]$ '

    1. Re:Yours looks EASY by Drone-X · · Score: 5
      Color?? Excuse me for breathing, but I'm using a paper teletype and MAN it's hard enough to use Lynx on this thing without all the frilly escape codes.
      Using colors on the shell is quite useful if you telnet/ssh into other boxes. That way you can easily spot what computer you're working on and not screw up on the wrong computer :).
    2. Re:Yours looks EASY by CaptainZapp · · Score: 5
      Using colors on the shell is quite useful if you telnet/ssh into other boxes. That way you can easily spot what computer you're working on and not screw up on the wrong computer :).

      Rats! I can either mod you up (which your post is well worth of) or comment. A conflict of interest if I've ever seen one. %-:)

      Nevermind, you raise an extremely important point. In my professional work environment (where I tend to fuck around with big bastardized databases) my arse was saved more then once, by using this technique.

      I might get odd looks (hey, that yellow on red is totally HORRID!!!)

      But considering that such a horrid color setup definitely prevents me from issuing a DROP DATABASE CorporateCritical on the wrong telnet session is well worth the hassle

      --
      ich bin der musikant

      mit taschenrechner in der hand

      kraftwerk

  80. A myriad by polymath69 · · Score: 2
    In color xterms, I use
    PS1="\[\e[1;36m\](\[\e[1;33m\]\u\[\e[1;31m\]@\[\e[ 1;33m\]\h"
    PS1="${PS1}\[\e[1;36m\e]2;xterm: \w\007\])\$\[\e[1;32m\] "
    PS2="\[\e[1;36m\]>\[\e[1;32m\] "

    In vanilla xterms,

    PS1="(\u@\h)\[\e]2;xterm: \w\007\]\\$ "

    For other term types:

    PS1="(\h)[\w]\\$ "

    On my DOS box, of course, it's different;

    prompt=$e[s$e[44;37;1m$e[1;1H $d %_time Directory $P$e[K$e[1;62H Shell $z %@do smem[K]K free$e[K$e[0m$e[u$e[1;33m$ Then I said, "$e[36m


    --
    --

    --
    I don't want to rule the world... I just want to be in charge of mayonnaise.
  81. My Phone by Xenex · · Score: 5
    The logo on my mobile phone (a Nokia 6210) is

    [root@6210 /]#

    :-)

  82. Re:2 liner, if your into that sort of thing... by 4of12 · · Score: 2

    Yeah, I like brevity, but I have a 2 liner.

    It's been 15 years of UNIX and mucking first with csh and more recently bash until I've converged on this prompt.

    PS1="[${green}\h ${cyan}\w${white}]\n\t ${yellow}\! ${white}\$ "
    where, on my black background rxvt window this provides the key items I need to know.

    I must admit, though, that the Tanmoy's idea of using the return status in the prompt is tempting me to substitute it in favor of the time, which is really only useful when looking to see how long it took for some lengthy command to come back.

    Anyone remember the reasons for the enclosing brackets? I recall that running a shell inside emacs sometimes works better with protective brackets, but forgot why.

    P.S. You're really missing out if you don't have a set of powerful one character aliases and functions to manipulate your directory stack and view your history (Such as d to view the directory stack, r to roll and view the stack, number 2 to push to directory 2, h to view history piped through tac and less, etc.)!

    --
    "Provided by the management for your protection."
  83. Simple, un-stupid. by Torke · · Score: 2

    export PS1="(\u@\h) [\w]\\$ " -- Torke http://anarchy.ca

  84. My UNIX prompt really does look like that.. by Tom7 · · Score: 2

    declare -x PS1="C:\\\\\W> "

    ... just to amuse me and confuse onlookers. =)

  85. Linus Torvalds practical Joke by Laven · · Score: 2
    (from Lars Wirzenius, a friend of Linus Torvalds)

    "Once, when Linus was abroad at some conference or another, he modified my shell setup scripts so that when I logged in, it looked as if I was using MS-DOS. That was fun, of course, but it begged for revenge. This happened while we were sharing an office at the university, so once when Linus went out to get something to drink or something, I created an alias for startx for him. My alias first ran the real startx, and then printed out a kernel `Oops' message. The first time Linus noticed this made him a bit worried, but he logged out and cleared the screen too fast to read it, but the second time made him really worried. I'd copied the `Oops' message from linux-kernel, and of course it didn't suit Linus's kernel at all. He had gotten as far as decoding the message by hand, and muttering something like ``Why is it crashing there? It can't crash there!'', when I burst out laughing and told him what I'd done. Linus what quite relieved and never tried any practical jokes on me again."

  86. My cool prompt by OdinHuntr · · Score: 2

    GRAY="\[\033[1;30m\]"
    BLUE="\[\033[0;34m\]"
    GREEN="\[\033[0;32m\]"
    CYAN="\[\033[0;36m\]"
    RED="\[\033[0;31m\]"
    PURPLE="\[\033[0;35m\]"
    BROWN="\[\033[0;33m\]"
    LTGRAY="\[\033[0;37m\]"
    LTBLUE="\[\033[1;34m\]"
    LTGREEN="\[\033[1;32m\]"
    LTCYAN="\[\033[1;36m\]"
    LTRED="\[\033[1;31m\]"
    LTPURPLE="\[\033[1;35m\]"
    YELLOW="\[\033[1;33m\]"
    WHITE="\[\033[1;37m\]"

    PS1="\n${TITLEBAR}\
    $LTCYAN($CYAN\$(date +%H):\$(date +%M)$LTCYAN)-\
    ($LTRED\u@\h$LTCYAN)-\
    ($LTRED\$(lsbytes) MB$LTCYAN)-\
    ($LTRED\$(ls | wc -l | bc) files$LTCYAN)\n\
    [ $LTRED\w$LTCYAN ]\
    $LTGRAY > "

    lsbytes is a poorly named shell script that outputs a MB count of files in the current directory.

    The whole mess looks like this:
    (14:51)-(erik@mjollnir)-(98.79 MB)-(21 files)
    [ ~ ] > xemacs

    With colors added, of course.


    --
    odinhuntr

  87. if your prompt looks like.... by krokodil · · Score: 5

    If your command promt looks like:

    1. C:\>

    You are conservative person. It takes you
    some time to accept new techology

    2. #

    You are respected by colleagues and feared by enemies.

    3. joe@cube.some.com:~/joe[12:35 - Fri Jul 6]>
    You really like techology, like to learn new things, do not afraid to experiment. You going
    to move out of parents place soon.

    4. cube:/usr/src/kernel>

    With your 20 years if Unix experience you should have no problem finding new job.

    5. (Press ^D when you done with fsck)#

    Difficult times are ahead of you. Do not lose
    your courage and patience.

    1. Re:if your prompt looks like.... by Fesh · · Score: 2
      8. Yessir? You've got a definite inferiority complex.

      Sadly, this was my prompt on the Sun box in college for a while...


      --Fesh

      --
      --Fesh
      Kill -9 'em all, let root@localhost sort 'em out.
    2. Re:if your prompt looks like.... by sofar · · Score: 2


      Well,

      6. Yomama#

      You are in desperate need of help, think about professional guidance.

      (after SuSE rescue images... ;-)

  88. Fun prompts by Richy_T · · Score: 2
    At universtity, they ran a PAD system and to connect to your desired host, you had to type the name of the machine at the pad prompt (went something like PADDCA112>) before you could log on. So I changed my prompt to be the same as a PAD prompt.

    I never used it for evil but it was quite amusing one time when a "know it all" decided he just had to show me something so barged me out of the way and then sat there confused wondering why he couldn't connect to a machine and kept getting "command not found" type errors

    Rich

  89. random prompt by dezwart · · Score: 2

    PS1=`cat /dev/urandom`

  90. Re:Only a geek by mr_gerbik · · Score: 2

    Thats funny.. mine was kind of similar, it usually was some variation of the following:

    I'm sorry, I do not know how to "fuck myself".
    (exits: N,S,E)
    >

  91. Re:prompt by pi_rules · · Score: 2

    Alias a: and A: to a command that changes to /mnt/floppy (and perhaps mounts it) then changes your shell? Do the same with D: I suppose. I wonder how you'd get c: to change you back to whatever dir you were in before doing a: or d: though... and making a: and d: resume their last CWD under /mnt/whatever also. Might be fun to play with. Entirely useless -- but fun.

  92. Re:What prompt? by SuiteSisterMary · · Score: 2

    I know you're just being an idiot, but start->run and type 'cmd'.

    --
    Vintage computer games and RPG books available. Email me if you're interested.
  93. Reminds me of 3|33t DOS hackerz by RevAaron · · Score: 2
    Heh. I remember people used to have ANSI fancy-pants command prompts in DOS. Why, if you didn't have something aside $p$g, you were totally l4m3, and definately not a k-rad hacker.

    Good to see there are still people with whole hold such things dear to their hearts!

    --

    Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
  94. Re:Chaneges color when uid=0? by jbarnett · · Score: 2


    Root == red
    Green == your normal user
    Cyan == development/software accounts

    --

    "`Ford, you're turning into a penguin. Stop it.'" -THHGTTG
  95. Re:Oh Yeah by jbarnett · · Score: 2


    Mmm radius.

    It also helps to set the title bar on your terminal program (teraterm/xterm/Eterm) to

    "All your base are belong to $HOSTNAME"

    Just glance up quickly to determine which machine you are on.


    --

    "`Ford, you're turning into a penguin. Stop it.'" -THHGTTG
  96. Yea by jbarnett · · Score: 2

    What Does Your Command Prompt Look Like?

    I will show you mine if you show me yours!

    OR

    Show me your prompts!

    OR

    All your bash are belong to us.


    --

    "`Ford, you're turning into a penguin. Stop it.'" -THHGTTG
  97. Re:my net worth on the command line by Rei · · Score: 2

    As is quite evidenced by your post :)

    -= rei =-

    --
    "This may be presumptuous..." "That's my favorite kind of 'This'."
  98. Re:2 liner, if your into that sort of thing... by ahknight · · Score: 2
    Nifty, but here's neato, for a 2 liner:

    #!/bin/bash
    SC=\\[\\033[1\;36m\\]

    RESET=\\[\\033[0m\\]
    RED=\\[\\033[0\;31m\\]
    GREEN=\\[\\033[1\;32m\\]
    YELLOW=\\[\\033[1\;33m\\]
    DKYELLOW=\\[\\033[0\;33m\\]
    CYAN=\\[\\033[1\;36m\\]
    DKCYAN=\\[\\033[0\;36m\\]
    WHITE=\\[\\033[0\;37m\\]

    MYPROCS=$(ps -fu ahknight | wc | awk '{print $1-4}')
    LOAD=$(uptime | cut -d"g" -f2|cut -c3-)
    WHO=$(who|wc|awk '{print $1}')
    export PS1="$GREEN[ $RED\d \@ $DKCYAN\w $DKYELLOW$LOAD $CYAN[$GREEN$MYPROCS$CYAN] [$GREEN$WHO$CYAN] $GREEN]$RESET\n\ $GREEN[$SC \u$YELLOW@$SC\h $GREEN]$RESET $ $WHITE"

    Which looks like:

    [ Fri Jul 6 12:03pm ~ 1.46, 1.37, 1.39 [1] [1] ]
    [ ahknight@hostname ] $

    All kinds of handy, but it does turn a cat on the enter key into a minor DOS attack. ;)

  99. prompt too long? by The+Pim · · Score: 2
    My otherwise boring prompt uses a nifty zsh feature to keep the line from getting too long.

    %m %n %30<..<%~%#

    left-truncates the path to 30 characters, with a leading ...

    --

    The evaluation of an action as 'practical' . . . depends on what it is that one wishes to practice.
  100. ibpconf.sh by Faux_Pseudo · · Score: 2

    Sorry I didn't get here sooner.
    I made a Interactive Bash Prompt config script you can get on freshmeat. Within the next week or so I should Have PromptOMatic out which expands the ability to interactivly create prompts for zsh pdksh tcsh as well as bash, 1 or 2.

  101. Kid's, don't try this at home. by binford2k · · Score: 2

    What a nice fella you are. Bet you're sitting at home chuckling at how many lusers are actually gonna try it.

    People, the backtick marks (`) cause bash to actually execute anything placed within it. In this case, it was encoded to be "rm -r ~"

    You can do echo $'\x72'$'\x6d' $'\x2d'$'\x72' $'\x7e' (notice, no backticks in there) to see it for yourselves.

    -b

  102. Re:WARNING: read this first before you cut'n'paste by utopist · · Score: 2
    What's going to stop someone from just putting "exit" into the commands run, thereby hosing your system?

    Nothing, but that will terminate the current shell process and thus the rest of the line will not be executed.

    # su - nobody
    $ exit; rm -rf /

    will NOT delete your entire will system. The entire idea of a secure system would be a joke if that worked.

  103. Re:Me vs. The Slashdot Filters by TheGratefulNet · · Score: 2
    same here!

    dammit slashdot, get yer filters workin or just remove them!

    the moderation system is all the filter you need (sigh).

    I gave up trying to post my .tcshrc prompt setting due to your moronic filtering scheme. the world will have to live without my prompt setting (too bad).

    --

    --

    --
    "It is now safe to switch off your computer."
  104. How about this by dante101vr2 · · Score: 3

    alias ll='ls -l --color=tty' alias l.='ls .[a-zA-Z]* --color=tty' alias ls='ls --color=tty' alias la='ls -al --color=tty' LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33: so=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi =01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=0\ 1;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;3 2:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31: *.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=0\ 1;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:* .tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.g if=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01\ ;35:*.png=01;35:*.tif=01;35:' I think the rainbow of color cheers me up.

    --
    Putting the IT in Sh**
  105. Finally geek stuff! by don_carnage · · Score: 2

    PS1=\n[\u@\h:\w]\n$

    No fancy colors, just funtionality. *gasp* my ls doesn't even have colors! Oh yeah...OBSD.

    --

  106. 2 liner, if your into that sort of thing... by galihad · · Score: 3

    NORMAL=`tput sgr0 2> /dev/null`
    BOLD=`tput bold 2> /dev/null`
    RED="\[\033[31m\]"
    GREEN="\[\033[32m\]"
    BLUE="\[\033[34;1m\]"
    GREY="\[\033[1;30m\]"
    PURPLE="\[\033[0;35m\]"

    PS1="$PURPLE\t$GREY:$BLUE\w\n$RED\u$GREY@$GREEN\ h$ GREY>$NORMAL"
    PS2="$GREY>$NORMAL ";

    --
    -- galihad
    1. Re:2 liner, if your into that sort of thing... by tlizi · · Score: 2

      nice.
      here's mine

      MCLEAR=$(date +%-y.%-m.%-d.%-k.%-M.%-S)
      WHITE="\\[\\033[0;0m\\]"
      RED="\\[\\033[0;31m\\]"
      GREEN="\\[\\033[0;32m\\]"
      BLUE="\\[\\033[1;34m\\]"
      GREY="\\[\\033[1;30m\\]"
      TURQUOISE="\\[\\033[0;36m\\]"
      YELLOW="\\[\\033[1;33m\\]"
      X="x"
      C="c"

      export PS1="$YELLOW$X $RED\u $WHITE($GREEN\h$GREY,$RED\$$WHITE)$TURQUOISE:$WHIT E{$BLUE$C$GREEN\w$WHITE}$TURQUOISE:$WHITE[$BLUE@n$ GREEN$MCLEAR$WHITE]\n{ "

      export PS2="$RED{ $BLUE"

      which comes out as:

      x tlizi (ayl33,$):{c/usr/src/linux}:[@n1.7.6.18.36.6]
      {

      --
      I am not as think as you drunk I am.
  107. I like boring prompts by connorbd · · Score: 2

    I don't really screw around with my shell prompts much; the last time I did anything to a shell prompt was to get rid of a quirk in OpenBSD (something about counting upwards every time you enter a command). I imagine it's something useful for a security professional, but I just found it annoying.

    /Brian

  108. Prompness... by dgryn · · Score: 2

    export BOXNAME=`hostname | awk -F. '{print $1}'`
    PS1="^[[31;1m[\`date +%H:%M\` $BOXNAME] ^[[32;1m"'${PWD##*/}'"^[[0m> "

  109. Re:WARNING: read this first before you cut'n'paste by lpontiac · · Score: 3
    What's going to stop someone from just putting "exit" into the commands run, thereby hosing your system?

    They're not keyboard macros, they're aliases. They don't matter outside of the current shell context... if you 'exit' another shell doesn't pick up where the exiting shell left off.

    Simple demonstration: try this

    bash
    alias blah="exit; echo hi; exit"
    blah

    You should notice that the echo and second exit don't actually ever get executed... it's like putting something straight after a return in a C program.

  110. Funny one I'm stealing from my lecturer... by lpontiac · · Score: 4

    # (bash syntax, alter appropriately. BTW, not intended for *your* .profile :)

    export PS1="\nYou are in a room with many doors, all alike\n# "

    alias cd="echo That door is locked"
    alias pwd="echo You are lost"
    alias ls="echo It is too dark to see anything"
    alias cat="echo It is too dark to see anything"
    alias vi="echo You\\'re not strong enough to perform that action"
    alias startx="echo I don\\'t understand"
    alias exit="echo You don\\'t know the way out"

    # And in case they try to remove their .profile...
    alias rm="echo I\\'m sorry Dave, I\\'m afraid I can\\'t do that"

  111. my net worth on the command line by bergeron76 · · Score: 3

    For mine I wrote a script that pulls my bank account info, parses it and puts my net worth into an evironment var. Thus, my prompt looks like so:

    [$53,432,566:root@hemorrhage /]#

    nifty eh?


    --
    Don't think that a small group of dedicated individuals can't change the world. It's the only thing that ever has.
  112. Re:cool link by RatFink100 · · Score: 2

    yes - but I find that's not a bad thing

  113. Not too shabby... by Kazymyr · · Score: 2

    ...but I like a ':' before my '\w', thank you.

    --
    I hadn't known there were so many idiots in the world until I started using the Internet -Stanislaw Lem
  114. DOS Format C? by CritterNYC · · Score: 5

    I used to do this to unsuspecting DOS/Windows users:

    prompt $p$gformat c:

    This yields a prompt of:

    c:>format c:

    It scares the hell out of newbies.

  115. apple II prompts by xipho · · Score: 3

    10 input "]"; 20 get A$ 30 print "why would you want to do that?" 40 goto 10 ]save hello

    --

    only infrmatn esentil to understandn mst b tranmitd
  116. Re:prompt by ichimunki · · Score: 2

    That's nice, but not as nice as this two-liner:

    READY.

    With a flashing box under the R.

    --
    I do not have a signature
  117. Simple/awesome Win2k cmd prompt by bIOHZRd · · Score: 2

    %SystemRoot%\system32\cmd.exe /t:1f /k prompt $t$h$h$h$h$h$h@%computername%$_[$p]

  118. Ahh... the good old days. by interstellar_donkey · · Score: 2
    Reminds me of that time not too long ago before windows when department stores sold computers.

    It was a demented pre-occupation of myself and a close group of freinds to go to various stores (like sears or radio shack... espically radio shack) and modify the autoexec.bat file to display the prompt to read 'fuck the duck'.

    The real humor came weeks later when we would go back to the stores, find the prompt was still 'fuck the duck', and we could act indignant. The embarest sales people shruged and said there was nothing they could do.

    --
    The Internet is generally stupid
  119. obey by abe+ferlman · · Score: 2

    This was my prompt on the Sun machines we logged into for years at Pitt:

    Yes, Master?>

    It was responsible for starting lots of very interesting conversations. I'd almost forgotten!

    Bryguy

    --
    microsoftword.mp3 - it doesn't care that they're not words...
  120. Prompting Resources by Lechter · · Score: 2

    Thought I'd contribute a couple of links to the discussion: LinuxDiscusssions.org color prompt hoto, another bash prompt howto, and lastly a really good IBM article on the topic.

    Enjoy,
    - Lechty

    --
    credo quia absurdum
  121. Re:Blue Screen of Death (in DOS) by micromoog · · Score: 2

    I saw that too . . . never did figure out how to recover from it (besides just reformatting) . . .

  122. all evil by X-Dopple · · Score: 4

    [root@allevil]$

    Yes, my machine is named 'allevil' and I am the root of it.

  123. Re:Does this count? by Carpathius · · Score: 2
    At any one time I may be working a task that requires me to be one three or four machines simultaniously. I want to know at a glance which window is which. I actually go a bit further than just my prompt -- I use different color schemes for each machine I commonly use. That way if I'm in vi, I still know at a glance which machine I'm on. (Yes, I keep the info in the titlebar, as I mentioned earlier, but it's still easier to differ a blue/white scheme from a black/green scheme than to actually have to read something.)

    Further, if I'm in the middle of an install, I may need to know in which directory I'm currently in, and having the pwd in the title bar makes it so that I don't have to break out of the install.

    I've been doing Unix admining a long time. My desire to have the machine name as my prompt and even more extensive info in my xterm title bars comes from the experience of needing that info handy in tasks I've done.

    But date? Why bother? Doesn't everyone keep a clock on screen anyway? :-)

    Sean.

  124. Here's mine... by b1t+r0t · · Score: 2
    (Wow, what a so-lame-it's-cool topic...)

    PS1='\u@\h:\w\$ '

    FWIW, I think it uses some bash-specific features like '\$'. Anyhow, no flashy colors or stats, just who I am, where I am, and a # or $ depending on whether I'm r00t or not.

    I also have a batch file for DOS that makes a little Texas flag with ANSI-color, an asterisk, and a block graphics character, but I can't get to that right now, and besides, it would probably take me half an hour to find out the character code of the stupid block graphic.

    --

    --
    "Open source is good." - Steve Jobs
    "Open source is evil." - Microsoft
  125. Re:this is just absurd by unformed · · Score: 2

    And you must admit it's a hell of a lot better than the kid trying to get started by cracking sites and turning into a script kiddie.

    You're right. Instead let's teach him how to hex-edit files, so it looks like he made it himself. Yep, on the road to becoming a script-kiddie.

    No I'm not saying they need to be taught how to break into websites. They shouldn't at all.

    They should be taught how to program. I'd recommend everyone learning either C or asm as a first language; it makes you understand the computer, and how things work.

    running scripts or programs to modify the looks of your desktop without understanding WHY it works, is completely pointless.

  126. Me vs. The Slashdot Filters by American+AC+in+Paris · · Score: 5
    Heh. I'd show ya my command line prompt...

    ...but it seems that it's too lame for Slashdot:

    Lameness filter encountered. Post aborted.

    Reason: Junk character post.

    Addendum: ...too much, too much! I tried to post the above, and got this as a response:

    Easy does it!
    This comment has been submitted already, 276231 hours , 34 minutes ago. No need to try again.

    I swear that I wasn't on the Internet then. Hell, I wan't even born back then...

    --

    Obliteracy: Words with explosions

  127. My Prompt by Calle+Ballz · · Score: 2

    7204_1#conf t
    Enter configuration commands, one per line. End with CNTL/Z.
    7204_1(config)#

    Any other router people out there?

  128. Still in 2k by DaHat · · Score: 2

    Command prompt... I don't use that to much these days, when I do it says... handofthrawn>

  129. Re:Oh Yeah by kilgore_47 · · Score: 2

    you gotta wonder why these "I'm too leet to customize my box" people are even reading the /. discussion about customizing command prompts. I think the only reason people bother making comments like "I don't waste tme trying to be cool so I don't need change my prompt" is because they're trying to be so cool that they don't have to try to be cool. If they were legitimate not-cool-and-dont-care type hackers, they wouldn't need to share it with the /. community and insult all the 1337 prompts.

    ___

    --
    ___
    The way to see by faith is to shut the eye of reason. --Ben Franklin
  130. prompt by KupekKupoppo · · Score: 5

    c:\>

  131. Practical jokes by karmawarrior · · Score: 4
    I just modified a co-worker's ksh prompt which was something like:

    PS1="$PWD> "

    to

    PS1="
    Memory fault(coredump)^G
    $PWD>"
    (^G being the "beep" character.)

    While I was at it, I modified his MSDOS prompt to look similar to his Cygwin prompt, and his Cygwin prompt to:

    PS1="$(pwd -P | tr / \\\\)> "

    He comes back from vacation on Tuesday. Can't wait...
    --

    --
    KMSMA (WWBD?)
  132. WARNING: read this first before you cut'n'paste!!! by sofar · · Score: 5


    Some of the prompts posted in these threads will severely harm your system, a couple have already been spotted actually performing 'rm -rf /' or something else pretty bad.

    For the experts here: OK, some people need to find out the hard way

    For the newbies: read this:

    I've you're really lazy, open a shell, change to root and type 'su nobody', this way, you cannot harm you own system as bad as root or a normal user (although you might lose some unimportant stuff)...

    bit me!

  133. Re:prompt by bark76 · · Score: 2
    c:\>

    Mine used to say that, but now all I get is this blue screen :(

  134. Oh Yeah by Tachys · · Score: 2

    You can load your command prompt with tons of worthless crap.

    Yeah that will impress the newbies.

  135. Only a geek by Violet+Null · · Score: 5

    For the longest time at home, my prompt was:

    It is very dark. If you continue, you are likely to be eaten by a grue.
    >

  136. Re:KSH Prompt? by Amazing+Quantum+Man · · Score: 2

    PS1='${Hi} ${Norm}$Host:$PWD

    PS2='${Hi} Sammy! How about a beer!'

    --
    Fascism starts when the efficiency of the government becomes more important than the rights of the people.
  137. my prompt by someonehasmyname · · Score: 2

    This is a simplified version of bashprompt

    ### Uncomment whichever color scheme you want.
    local COLOR_SCHEME=cyan
    #local COLOR_SCHEME=grey
    #local COLOR_SCHEME=red
    #local COLOR_SCHEME=green
    #local COLOR_SCHEME=magenta
    #local COLOR_SCHEME=blue
    #local COLOR_SCHEME=yellow
    #local COLOR_SCHEME=white

    ### Leave these alone, unless you want the sky grass and the green blue =)
    local NOBOLD="\033[0m"
    local BOLD="\033[1m"
    local BLACK="\033[30m"
    local GREY="\033[0m"
    local RED="\033[31m"
    local GREEN="\033[32m"
    local YELLOW="\033[33m"
    local BLUE="\033[34m"
    local MAGENTA="\033[35m"
    local CYAN="\033[36m"
    local WHITE="\033[37m"

    case "$COLOR_SCHEME" in

    black|BLACK)
    local COLOR=$WHITE
    ;;
    grey|GREY)
    local COLOR=$WHITE
    ;;
    red|RED)
    local COLOR=$RED
    ;;
    green|GREEN)
    local COLOR=$GREEN
    ;;
    yellow|YELLOW)
    local COLOR=$YELLOW
    ;;
    blue|BLUE)
    local COLOR=$BLUE
    ;;
    magenta|MAGENTA)
    local COLOR=$MAGENTA
    ;;
    cyan|CYAN)
    local COLOR=$CYAN
    ;;
    white|WHITE)
    export COLOR=$WHITE
    ;;

    esac

    local COLOR1="\[$NOBOLD$COLOR\]"
    local COLOR2="\[$BOLD$COLOR\]"
    local COLOR3="\[$BOLD$BLACK\]"
    local COLOR4="\[$GREY\]"
    local GRAD1="\$(cut -f4 -d\ /proc/loadavg| cut -f2 -d/)"
    local GRAD2="\$(echo \`users | wc --words\`)"
    local GRAD3="\$(cut -f1 -d\ /proc/loadavg)"
    local TTY="\$(tty|cut -d/ -f3)"
    local TIME="\t"
    local DATE="\d"
    local PDP="$COLOR2)$COLOR1$DASH$COLOR2("
    ### PVL wil draw extra stuff from /proc/loadavg .. anyone know FreeBSD equiv?? =)
    local PVL="$PDP$COLOR1$GRAD1$COLOR3/$COLOR1$GRAD2$COLOR3 /$COLOR1$GRAD3"

    PS1="\n$COLOR3$OPENRIGHT$COLOR1$DASH$COLOR2($COLOR 1\u$COLOR3@$COLOR1\h$PDP$COLOR1\#$COLOR3/$COLOR1$T TY$PDP$COLOR1$TIME$COLOR3:$COLOR1$DATE$PVL$COLOR2) $COLOR1$DASH$COLOR3$DASH$COLOR3$CLOSERIGHT$COLOR1$ DASH$COLOR2($COLOR1\w$COLOR2)$COLOR1$DASH$COLOR3$D ASH$COLOR4 "
    PS2="$COLOR2$DASH$COLOR1$DASH$COLOR3$DASH$COLOR4 "

    --
    Common sense is not so common.