Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Aug 2008 02:35:36 +0200
From:      Polytropon <freebsd@edvax.de>
To:        Robe <vcrobe@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Help changing the prompt
Message-ID:  <20080826023536.704ff619.freebsd@edvax.de>
In-Reply-To: <221c791e0808250832j3fb88887m6d7155052f45c5ff@mail.gmail.com>
References:  <221c791e0808250832j3fb88887m6d7155052f45c5ff@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 25 Aug 2008 10:32:22 -0500, Robe <vcrobe@gmail.com> wrote:
> Hi there,
> 
> I'm trying to change the prompt in the *text (console) mode* for a
> restricted user with a statement like this
> 
> set prompt = "%~> "
> 
> But it doesn't work. And when I type *set* I see _ = "%~> " instead prompt =
> "%~> "
> 
> However when I do it logged as a root it works.



> Can someone help me with this?

Maybe the user where you want to change the prompt has an
overriding setting in ~/.cshrc? You are using the C Shell,
right?

Check the prompt and promptchars variables.

I have this form system wide in /etc/csh.cshrc:

	set promptchars = "%#"
	set prompt = "%n@%m:%~%# "
	set autolist

If a user wants another prompt, the respective setting has
to be set in his ~/.cshrc. This gives you prompts like

	root@wtz34:/usr/src/# _

or

	bob@click:~/my_videos% _

You would then correctly use the form "%~> " for a prompt
like:

	~/foo/bar> _


-- 
Polytropon
>From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080826023536.704ff619.freebsd>