Prev: Use a clever "grep" or other command
Next: Have /etc/sudoers entry, but still getting prompted for a pw. Why?
From: Jonathan de Boyne Pollard on 10 May 2010 16:42 > >> >> man $SHELL >> > That just generates a bunch of error messages... > The traditional answer to "How do I get the name of the current directory into my prompt?" has always been: PS1=".$" I'm surprised that it has been forgotten. (-: I'm even more surprised that "For goodness' sake, man, read �G5 of the bash FAQ!" has been forgotten as an answer, too.
From: pk on 10 May 2010 17:07 Jonathan de Boyne Pollard wrote: >> >>> >>> man $SHELL >>> >> That just generates a bunch of error messages... >> > The traditional answer to "How do I get the name of the current > directory into my prompt?" has always been: > > PS1=".$" Are you sure? $ export PS1=".$" ..$ ..$cd www ..$
From: Seebs on 10 May 2010 18:55 On 2010-05-10, pk <pk(a)pk.invalid> wrote: > Jonathan de Boyne Pollard wrote: >> The traditional answer to "How do I get the name of the current >> directory into my prompt?" has always been: >> >> PS1=".$" > Are you sure? He's making a joke. > $ export PS1=".$" > .$ > .$cd www > .$ And look! There it is, in your prompt: ".", the name of the current directory. He did not say it was a *useful* answer, only that it was the *traditional* answer. I would quibble with "the", but it is certainly traditional on Usenet to answer questions in a way which maximizes technical accuracy while minimizing utility, in the hopes of teaching people to learn to ask better questions. -s -- Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nospam(a)seebs.net http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
From: pk on 10 May 2010 18:49 Seebs wrote: > On 2010-05-10, pk <pk(a)pk.invalid> wrote: >> Jonathan de Boyne Pollard wrote: >>> The traditional answer to "How do I get the name of the current >>> directory into my prompt?" has always been: >>> >>> PS1=".$" > >> Are you sure? > > He's making a joke. > >> $ export PS1=".$" >> .$ >> .$cd www >> .$ > > And look! There it is, in your prompt: ".", the name of the current > directory. > > He did not say it was a *useful* answer, only that it was the > *traditional* > answer. I would quibble with "the", but it is certainly traditional on > Usenet to answer questions in a way which maximizes technical accuracy > while minimizing utility, in the hopes of teaching people to learn to ask > better questions. Right. Apologies for not getting it...and it was quite obvious!
First
|
Prev
|
Pages: 1 2 3 Prev: Use a clever "grep" or other command Next: Have /etc/sudoers entry, but still getting prompted for a pw. Why? |