tobold.org

correct • elegant • free

△ comp.unix.shell △

◅ kill -9 in script

assignment syntax ▻

PS1

In article <8do0n1$4jo$4@brokaw.wa.com>, Ken Pizzini <ken@halcyon.com> wrote:
>(I like being reminded when I'm super-user, so that I can
>remember to be extra careful.)

Indeed.

    if (~ $USER root) {
            prompt=(`{basename `{uname -n} .star.le.ac.uk} ^ '# ' '  ')
    } else
            prompt=('; ' '  ')

I added the hostname to the root prompt after typing `reboot' at a PC...
unfortunately that window was logged into the mail server :-(.

rc's default prompt is ('; ' ''), which I find just a little too
minimal.  The two spaces remind me I need to type something more,
without destroying cut'n'pastability (and they make multi-line commands
line up nicely).

Tim.
--
Tim Goodwin   | "If you don't know what closures are, you probably don't
Leicester, UK | want to know what closures are." -- Larry Wall

Original headers:

From: tjg@star.le.ac.uk (Tim Goodwin)
Newsgroups: comp.unix.shell
Subject: Re: PS1
Date: 27 Apr 2000 12:13:58 +0100
Message-ID: <8e97ec$ur8$1@ltpcg.star.le.ac.uk>
References: <8dlp8m$2ot$1@nnrp1.deja.com>
  <38FF22D5.4D491766@austin.ibm.com> <8dnd2f$7tf4h$5@fu-berlin.de>
  <8do0n1$4jo$4@brokaw.wa.com>

△ comp.unix.shell △

◅ kill -9 in script

assignment syntax ▻