[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Getting a prompt to show directory path under RH 9.0 bash shell
- From: bfd <bfd pcisys net>
- To: Red Hat List <redhat-list redhat com>
- Subject: Re: Getting a prompt to show directory path under RH 9.0 bash shell
- Date: Tue Sep 2 00:50:01 2003
Sean Estabrooks wrote:
On Mon, 01 Sep 2003 16:20:53 -0600
bfd <bfd pcisys net> wrote:
Hello,
I want my prompt, both in the text console and X-windows shell console,
to show the path to the current directory, e.g.,
[/usr/local/mozilla/icons]$
Under RH 7.3, I could get this by adding to my .bashrc file the lines
PS1=[\\w]\\$
export PS1
When adding these lines into .bashrc under RH 9.0, after typing
"startx", I get a black screen with a black X indicating the mouse
cursor. I believe that X is loading but KDE never loads.
If I remove the above two lines from my .bashrc file, then KDE loads but
my PS1 prompt is
[\u \h \W]\$
which give me a display of
[bfd morgaine bfd]$
If I open a shell console under KDE after it loads and then issue
PS1=[\\w]\\$
I get what I want.
But I can't get it to load initially and it seems to be preventing KDE
from loading. This makes no sense to me, but it is happening. Ain't
computers grand? <g>
So, two questions:
1. What is going on when I try to use PS1=[\\w]\\$ that X but not
KDE loads
and
2. how can I get the prompt that I want into my .bashrc file so that
it will always be there regardless of what I am running
BFD
Could not reproduce this problem here (admittedly not stock RH9).
Perhaps you could post your entire .bashrc ?
Regards,
Sean
I've used this .bashrc file for various versions of RH, Slackware and
FreeBSD. It should be pretty explanatory.
# .bashrc
# User specific aliases and functions
alias mv='mv -i'
alias rm='rm -i'
alias cp='cp -i'
alias cls='clear'
alias dirr='ls -al | more'
alias hist='history'
alias startx='startx -- -nolisten tcp'
alias su='su -m'
alias lsc='ls --color=none'
shopt -s histverify
# directs history file to not include the listed commands
# and not to include duplicate commands
HISTIGNORE='cls:cd:dirr:hist:su'
history_control=ignoredups
umask 077
#fix RH mangled sort order
#LC_ALL=C
#LANG=C
#export LC_ALL
#export LANG
BASH_ENV=$HOME/.bashrc
USERNAME=""
TIMEOUT=3600
export USERNAME BASH_ENV TIMEOUT
#PS1=[\\w]\\$
#export PS1
# these are not needed for RH, but for Slackware
#TERM=xterm-color
#export TERM
#DISPLAY=:0
#export DISPLAY
# Need to modify this based on program locations
# and if vi and emacs are custom installs
#set -o vi
#export EDITOR=/usr/local/vim
set -o emacs
# export EDITOR=/usr/local/emacs
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
-------------------------------------------------
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]