From: Roland Kruse <Roland.Kruse@powel.no>
Cc: rk
Subject: Re: Need to display $PWD in prompt using /bin/ksh
Date: 1996/11/28 [thread overview]
Message-ID: <329D86F5.426@powel.no> (raw)
In-Reply-To: 57j43v$l87@portal.gmu.edu
Mathew E Goldstein wrote:
>
> clos@ivory.trentu.ca wrote:
>
> : I have tried the following aliases in my .profile but with out success:
> :
> : alias p='PS1=`hostname|cut -d. -f1`":$PWD#"'
> : alias cd='cd \!* ; p'
You don't need an alias at all, just do this:
PS1="\$PWD# "
The important thing is the \ before $PWD, it forces the shell
to re-evaluate $PWD each time the prompt is printed.
BTW, I don't like the "#" in your prompt, it looks too much like
a root prompt. Personally, I use
PS1="`hostname`:`whoami` \$PWD> "
BTW2, you should put all alias and prompt settings in a
.kshrc file, and just
ENV=$HOME/.kshrc; export ENV
in .profile.
Roland Kruse
next prev parent reply other threads:[~1996-11-28 5:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-11-27 5:00 Need to display $PWD in prompt using /bin/ksh clos
1996-11-28 5:00 ` Edgar Hiersekorn
1996-11-28 5:00 ` Michael Livingston
1996-11-28 5:00 ` Raymond N Shwake
1996-11-29 5:00 ` John Meyers, Computing Services
1996-11-28 5:00 ` Harald Finster
1996-11-28 5:00 ` Mathew E Goldstein
1996-11-28 5:00 ` Roland Kruse [this message]
1996-12-02 5:00 ` Ian Mortimer
1996-12-07 5:00 ` system PRIVILEGED account
1996-12-09 5:00 ` Ian Mortimer
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox