prompt question

David F. Skoll dfs at doe.carleton.ca
Fri Feb 8 06:29:10 AEST 1991


In <51331 at sequent.UUCP> edw at sequent.UUCP (Ed Wright) writes:

>You can take that to a silly extreme

>alias cd 'cd \!* ;set prompt=`hostname`" "`whoami`" "`pwd`" {\!} "'

I have taken my prompt to an even SILLIER extreme (but I like it.)  Here's
an extract from my .cshrc:

	alias cd "cd \!*; prompt"
	alias chdir "cd \!*"
	alias popd "popd \!*; prompt"

	set effuser=`whoami`
	set host=`hostname`
	set tty=`tty`

	if ($effuser == "root") then
		set hash="#"
	else
		set hash="%"
		set path=($path .)
	endif

	alias prompt 'set prompt="--> $cwd <--\\
\\!: ${effuser}@${host}($tty:t)${hash} "'

This is what is looks like right now:

	--> /enterprise/transporter/dfs <--
	2: dfs at riker(ttyp4)% 
	                     |
	Cursor here ---------+

--
David F. Skoll.



More information about the Comp.unix.misc mailing list