[plug] How to force a shutdown with reboot??
James Devenish
devenish at guild.uwa.edu.au
Tue Dec 30 13:36:37 WST 2003
In message <1072760889.6229.93.camel at lukenew>
on Tue, Dec 30, 2003 at 01:08:10PM +0800, Luke Dudney wrote:
> Using bash I have my PS1 set to
> 0=[12:52:22]luke at skippy:~$ echo $PS1
> $?=[\t]\u@\h:\w\$
[...]
> The return value of your last command is always important to know;
Ah, a kindred spirit! Other people always give me weird looks when I
explain what "that number" is doing in my $RPROMPT :-)
> Does anyone else have any preferences or hints on a productive shell
> prompt?
I tend to have my prompt grow and shrink according to how far the
current shell status deviates from what I would otherwise "take for
granted". Some examples are (colors and text styles not shown)...
"Typical" shell prompt showing hostname, screen window, time, current
working directory, shell nesting level, off-normal umask, first char of
$TERM, ssh-agent status and return code of last command:
hostname/0( 1:17PM)/current/directory%2% (022)s*1
A variation on the above, if I have used su or sudo to become a user
that is not my default for that host:
hostname-root/0( 1:17PM)/current/directory#2# (022)s*0
Another useful indicator is for $DISPLAY, because I tend to move around
to different machines a lot, and $DISPLAY is often not the display where
I am physically located and I tend to forget this (esp. with SSH + GNU
screen). I also have the foreground colour change to red if $? is not
zero, so that I don't forget to look at the exit status of long-running
commands that were issued in windows to which I haven't been paying
attention.
PS. I suppose I would mention that I typically use 132-character
terminals rather than 80. I have an alternative set of (reduced-
length) prompts that I use for narrower terminals.
More information about the plug
mailing list