Strange term prompt - \s\v \u@\h \w%

bluehz

Registered
I am getting a strange prompt when I boot into single-user mode. The prompt looks like this:

\s\v \u@\h \w%

I am not sure but I don't think it was like that before and I think it started appearing after switching my shell to bash. I didn't really like bash - so I am using tcsh again in the terminal, but I never deactivated/removed bash though.

Does any one know what casues this strange prompt?
 
that is the prompt string ($PS1) for BASH.

Im not sure off the top of my head what \s and \v are, but \u is user, \h is host and \w is working directory. Bash would expand those ito something like

user@host /tmp/foo%

As for what tcsh uses? I have no idea, but you could do a "grep 'PS1' /etc" in the terminal to find all ocurrances of PS1 in the config files in there.... and if any of them match that string, try commenting them out.
 
On further inspection, it looks like tcsh doesn't even use the PS1 variable and instead uses 'prompt'. So I have no idea why its grabing bash's prompt config.
 
I don't think tcsh is grabbing the bash profile.....the terminal is fine. I only see the strange prompt when I boot into single-user mode. Which I assume is now attempting to use BASH since I set that as the default. Prob should just back step through the process of changing bash to the default as listed at OSXHints.
 
You could also do a 'man bash' and wade through the manpages looking for the file in which the prompt is set.

But here's a hint: try looking in your home directory for .profile, .bashrc. and/or .login -- to show files that begin with a dot, use 'ls -a'.

If those are not there (or not the culprit) try looking in /etc for profile or bashrc (those aren't dot files -- just as is)

Oh yeah, for single user mode, find out what directory that uses to start up. An easy way would be to start up in single-user mode and enter 'pwd' to get the current working directory.
 
Cool thnx - I have lots of 'dot' files in my home dir as I have done a great deal of customizing. Not sure what each one is so I am a little leary of willy nilly deleting.
 
What shell is root using? You can find out by doing a 'nidump passwd .' in the shell.

Single user mode should only be looking at the config files in /etc/ for shell config things, so I wouldn't worry about the ones in your home directory.
 
Back
Top