[plug] pushd and popd

Steve Foreman plutowa at iinet.net.au
Fri Jan 21 12:17:18 AWST 2022


I also use it in scripts as it doesn't mess with $OLDPWD and easily leaves you in the directory you run the script, despite the directories in which the script needs to run.
It makes the use of relative paths in arguments much easier.

On 21 Jan 2022, 11:41 am, at 11:41 am, Brad Campbell <brad at fnarfbargle.com> wrote:
>On 20/1/22 13:06, Juneidy wrote:
>> Hi guys,
>> 
>> I first heard about `pushd` and `popd` from Alistair long time ago
>and 
>> never really seriously thought about how to use it from my day to day
>
>> work. The closest I have used daily is `cd -`.
>> 
>> Then a conversation in office lead to someone talking about `pushd`
>and 
>> `popd` again.
>> 
>> I wonder if anyone here used `pushd` and `popd` frequently? What sort
>of 
>> navigation would you use that for?
>
>
>I use them all the time in scripts. On the command line I just use 
>$OLDPWD and bash history, though now you've brought it up I might 
>explore it a bit. Old habits die hard though.
>
>Regards,
>Brad
>-- 
>An expert is a person who has found out by his own painful
>experience all the mistakes that one can make in a very
>narrow field. - Niels Bohr
>_______________________________________________
>PLUG discussion list: plug at plug.org.au
>http://lists.plug.org.au/mailman/listinfo/plug
>Committee e-mail: committee at plug.org.au
>PLUG Membership: http://www.plug.org.au/membership
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plug.org.au/pipermail/plug/attachments/20220121/76ed0fab/attachment.html>


More information about the plug mailing list