Subject: Prompt exchanging [Re: Few questions...]
To: None <port-amiga@NetBSD.ORG>
From: Ruben van Staveren <ruben@luna.net>
List: port-amiga
Date: 07/24/1998 11:13:41
And while we are at it, here is my prompt, with automatic screennumber handling
under tcsh.

An other trick under tcsh is the bindkey command, which allow you to remap
keystrokes so that instead off using Emacs like keybindings, you can map it
to e.g. Kingcon like bindings. (does not work with all TERM's)

if ($?TERM && ${TERM} != "screen") then
# this is not to abort e.g. rsh/rcmd session where TERM is not set
	setenv WINDOW "-"
endif

set prompt="(%B%?|%m|%l[${WINDOW}]%b) %c2 %# "

And it wil look like this

(0|enterprise|ttyp0[-]) ~ > 
 ^ ^^^^^^^^^^ ^^^^^ ^   ^ ^
 \      \       \   \   \ `- userlevel: '#' for root, '>' otherwise
  \      \       \   \   `-- cwd: home or last 2 pathcomponents truncated
   \      \       \   `----- current screen number, or - if not using screen
    \      \       `-------- current tty
     \      `--------------- hostname
      `--------------------- exit status of last command


the %c2 trick makes to prompt stay short in e.g. /usr/local/share/ghostscript/5.10/doc/

On Thu, Jul 23, 1998 at 08:26:29PM +0000, Matthias Scheler wrote:
> 
> > On my sytem I get a prompt like this:
> > 
> >    billy@musashi:~/c/ATA2/src>
> 
> That monster alias construct above is only required with the orignal "csh"
> or very old "tcsh" versions. With a current "tcsh" e.g. built from
> "pkgsrc/shells/tcsh" you only need this:
> 
> set prompt = "$USER@`hostname -s`:%~>"
> 
> And because "tcsh" has command line editing, filename completition and
> other nifty features you want to use it instead of "csh" anyway.
> 

And compile it staticly as /bin/tcsh to use it in single user mode :)
IRIX has it as the default shell, so why not NetBSD ?

Regards,
	Ruben


-- 
Ruben van Staveren  -   PGP public key on request   -  ruben@luna.net
Network Operations Mgt      _ //               Luna Internet Services
+31-(0)10.243.1988          \X/   Postbus 28013 3003 KA  Rotterdam NL
echo `echo "xiun"|tr nu oc|sed 'sx\([sx]\)\([xoi]\)x un\2\1 is xg'`ol