Mailinglist Archive: opensuse (933 mails)

< Previous Next >
Re: [opensuse] BASH prompt - change prompt on the fly -> shorter -> longer -> shorter
  • From: David Haller <dnh@xxxxxxxxxxxx>
  • Date: Fri, 4 Jun 2010 01:52:55 +0200
  • Message-id: <20100603235255.GA3482@xxxxxxxxxxxxxxxxxx>
Hello,

On Thu, 03 Jun 2010, David C. Rankin wrote:
I like the '-', but I still haven't figured out the '+'. I mean I've
confirmed
what it does and how it works:

+ is just an alias to pushd.

Hm, actually, what's it aliased to? On my 6.2 box, it's aliased to
'pushd .' and I thought it was aliased to 'pushd'.

david@alchemy[]: /var/log (0)$ +
/var/log /var/log ~

You just put /var/log (again) onto the dirs-stack. So, with that
alias, you can push a dir onto the stack after you changed to that
dir.

But remembering to pushd '+' any directory I need to come back to,
seem like something that I would forget to do a lot ;-)

re-alias it as 'pushd' (as I thought it was) and use it instead of
pushd ;) I.e.:

$ + /foo
$ -

To push after the fact, use '+ .' or alias '+.' to that ;)

Hey! I use bash for ~13 years and I'm still discovering new stuff.
And that's on the old box (OS installed in 1999):
$ rpm -q --queryformat '%{name}-%{version} %{installtime:date}\n' bash
bash-2.03 Tue 11 Jul 2000 08:47:52 PM CEST

HTH,
-dnh

--
"The command 'man man' works fine, but 'man woman' produces:
No manual entry for woman." -- Constantinos Maltezos
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
References