Help changing the prompt

Polytropon freebsd at edvax.de
Tue Aug 26 00:35:38 UTC 2008


On Mon, 25 Aug 2008 10:32:22 -0500, Robe <vcrobe at 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 at wtz34:/usr/src/# _

or

	bob at 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, ...


More information about the freebsd-questions mailing list