I use the following prompt which gives the hostname first,
followed by the name of the current directory.
#prompt
PS1=`hostname`': ~\W '
export PS1
You should probably just try to cut and paste it, rather than
type it. You have to make sure you get the right apostrophies
etc...
John.
"M.C. V
> As root my prompt has the working directory listed. Where is the file
> for the root prompt?
This can be set in ~/.bashrc and/or? ~/.bash_profile. I just checked, and
I have mine set in both (for what reason escapes me). I'm using:
PS1="\t [EMAIL PROTECTED] \\$ "
and then exporting
As others have already pointed out, that's actually a feature with "~"
representing your home-directory. If you want to force bash to display
the full path, you can embed ${PWD} into PS1 - be sure to enclose it in
single quotes, so that it's not expanded during the actual assignment.
On Tue, Jan
>
> OK, I did a search in Debian user's and came up with the the
> following to change my prompt:
>
> In /etc/profile I added the line,
> export PS1='\h:\w\$ '
>
> This is the readout I got,
> crossyourfingers:~$
>
> This wasn't what I wanted I only want the current working directory to
ktb wrote:
> In /etc/profile I added the line,
> export PS1='\h:\w\$ '
>
> This is the readout I got,
> crossyourfingers:~$
>
> This wasn't what I wanted I only want the current working directory to
> show. I took a look at the man page for bash. It said that "\w" would
~ is the name of yo
> This wasn't what I wanted I only want the current working directory to
> show. I took a look at the man page for bash. It said that "\w" would
> list my working directory. So I tried the following:
>
> If I use,
> export PS1='\w:\\$ '
>
> I get,
> ~:$
^
This is your working directory - ~
I wrote:
> There doesn't seem to be any way of turning this feature off in
> standard bash.
No, there isn't.
--
Henning Makholm
http://www.diku.dk/students/makholm
On Tue, Jan 12, 1999 at 09:01:53PM +, ktb wrote:
> OK, I did a search in Debian user's and came up with the the
> following to change my prompt:
>
> In /etc/profile I added the line,
> export PS1='\h:\w\$ '
>
> This is the readout I got,
> crossyourfingers:~$
>
> This wasn't what I wa
ktb <[EMAIL PROTECTED]> writes:
> show. I took a look at the man page for bash. It said that "\w" would
> list my working directory. So I tried the following:
> If I use,
> export PS1='\w:\\$ '
> I get,
> ~:$
That is a feature.
The tilde is a commonly-used abbreviation for "the home direct
OK, I did a search in Debian user's and came up with the the
following to change my prompt:
In /etc/profile I added the line,
export PS1='\h:\w\$ '
This is the readout I got,
crossyourfingers:~$
This wasn't what I wanted I only want the current working directory to
show. I took a look at
10 matches
Mail list logo