View Single Post
  #1   (View Single Post)  
Old 9th July 2008
JMJ_coder JMJ_coder is offline
VPN Cryptographer
 
Join Date: May 2008
Posts: 464
Default TCSH: 'set promptchars' not effecting su like it should

Hello,

I set up my TCSH configuration in NetBSD to make use of the promptchars feature, so that I would have % as the user prompt and # as the su prompt. If I don't set promptchars="%#", then the user prompt is > and the su prompt is # , but if I do then both are % . I have tried multiple combinations of commands, but to no avail. Here is my .cshrc, which I just modified from the default -

Code:
#	$NetBSD: dot.cshrc,v 1.3 2003/04/24 01:02:26 perry Exp $
#
# This is the default .cshrc file.
# Users are expected to edit it to meet their own needs.
#
# The commands in this file are executed each time a new csh shell
# is started.
#
# See csh(1) for details.
#

alias h		history 25
alias j		jobs -l
alias la	ls -a
alias lf	ls -FA
alias ll	ls -lA
alias su	su -m
alias date  "date '+%A %B%e, %Y - %l:%M:%S %p'"
alias poweroff  shutdown -p now
alias reboot    shutdown -r now

setenv	EDITOR	vi
setenv	VISUAL	${EDITOR}
setenv	EXINIT	'set autoindent'
setenv	PAGER	more
setenv  TERM    wsvt25

set path = (~/bin /bin /sbin /usr/{bin,sbin,X11R6/bin,pkg/{,s}bin,games} \
	    /usr/local/{,s}bin)

if ($?prompt) then
	# An interactive shell -- set some stuff up
	set filec
	set history = 1000
	set ignoreeof
	set mail = (/var/mail/$USER)
	set mch = `hostname -s`
        set promptchars="%#"
	set prompt = '%# '
	set autolist=ambiguous
endif
__________________
And the WORD was made flesh, and dwelt among us. (John 1:14)
Reply With Quote