Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #202317

Re: pushd/popd

From David Wright <deblis@lionunicorn.co.uk>
Newsgroups linux.debian.user
Subject Re: pushd/popd
Date 2018-11-11 07:00 +0100
Message-ID <wSQWR-8h2-1@gated-at.bofh.it> (permalink)
References <wQsP0-xe-13@gated-at.bofh.it> <wREXL-3XP-5@gated-at.bofh.it> <wSgA1-28q-3@gated-at.bofh.it> <wSGb7-1pD-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat 10 Nov 2018 at 09:47:37 (-0800), peter@easthope.ca wrote:
> *	From: peter@easthope.ca
> *	Date: Fri, 09 Nov 2018 06:20:01 -0800
> > Why?  Easy enough to use pushd/popd and easy enough to not [use] it but 
> > I'm interested in the reasoning behind this choice.
> 
> I've read the arguments but no answer to my question.
> Is there an intrinsic reason to avoid pushd/popd?  Not 
> in POSIX merely because it isn't done yet?

Oversimplifying somewhat…

Pushd/popd are really designed for interactive use rather than for
scripts. Hence they remind you of the stack's contents when you use them.

Dash is designed to be small and fast so that it can run scripts faster.
It doesn't need bloating with pushd/popd.

BTW whenever I change directory in scripts, I make sure that I'm in a
subshell by using ( and ), which guarantees that I get back to the
same directory however the script finishes.

Cheers,
David.

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Archiving content of a directory on a DVD-R. peter@easthope.ca - 2018-11-04 16:50 +0100
  Re: Archiving content of a directory on a DVD-R. "Thomas Schmitt" <scdbackup@gmx.net> - 2018-11-04 19:00 +0100
    Re: Archiving content of a directory on a DVD-R. Jonathan Dowland <jmtd@debian.org> - 2018-11-07 12:30 +0100
      Re: Archiving content of a directory on a DVD-R. "Thomas Schmitt" <scdbackup@gmx.net> - 2018-11-07 13:10 +0100
        Re: Archiving content of a directory on a DVD-R. Jonathan Dowland <jmtd@debian.org> - 2018-11-07 15:40 +0100
  Re: Archiving content of a directory on a DVD-R. David Christensen <dpchrist@holgerdanske.com> - 2018-11-05 00:20 +0100
  Re: Archiving content of a directory on a DVD-R. Greg Wooledge <wooledg@eeg.ccf.org> - 2018-11-05 15:10 +0100
    Re: Archiving content of a directory on a DVD-R. <tomas@tuxteam.de> - 2018-11-05 15:40 +0100
  Re : Archiving content of a directory on a DVD-R. peter@easthope.ca - 2018-11-07 23:40 +0100
    Re: Archiving content of a directory on a DVD-R. "Thomas Schmitt" <scdbackup@gmx.net> - 2018-11-08 09:00 +0100
  Re: Archiving content of a directory on a DVD-R. peter@easthope.ca - 2018-11-08 00:00 +0100
    pushd/podp (was Re: Archiving content of a directory on a DVD-R.) Jonathan Dowland <jmtd@debian.org> - 2018-11-08 10:50 +0100
      Re: pushd/popd peter@easthope.ca - 2018-11-09 16:10 +0100
        Re: pushd/popd Greg Wooledge <wooledg@eeg.ccf.org> - 2018-11-09 17:30 +0100
          Re: pushd/popd Jonathan Dowland <jmtd@debian.org> - 2018-11-09 21:50 +0100
        Re: pushd/popd Jonathan Dowland <jmtd@debian.org> - 2018-11-09 17:30 +0100
        Re: pushd/popd peter@easthope.ca - 2018-11-10 19:30 +0100
          Re: pushd/popd David Wright <deblis@lionunicorn.co.uk> - 2018-11-11 07:00 +0100
            Re: pushd/popd Greg Wooledge <wooledg@eeg.ccf.org> - 2018-11-12 14:50 +0100
              Re: pushd/popd David Wright <deblis@lionunicorn.co.uk> - 2018-11-12 21:40 +0100
    Re: Archiving content of a directory on a DVD-R. Greg Wooledge <wooledg@eeg.ccf.org> - 2018-11-08 14:20 +0100
      Re: Archiving content of a directory on a DVD-R. peter@easthope.ca - 2018-11-12 23:00 +0100
        Re: Archiving content of a directory on a DVD-R. Greg Wooledge <wooledg@eeg.ccf.org> - 2018-11-12 23:20 +0100
          Re: Archiving content of a directory on a DVD-R. peter@easthope.ca - 2018-11-13 03:40 +0100
            Re: Archiving content of a directory on a DVD-R. Greg Wooledge <wooledg@eeg.ccf.org> - 2018-11-13 14:20 +0100
              Re: Archiving content of a directory on a DVD-R. peter@easthope.ca - 2018-11-13 16:00 +0100
              Re: Archiving content of a directory on a DVD-R. Jonathan Dowland <jmtd@debian.org> - 2018-11-14 11:00 +0100
                Re: Archiving content of a directory on a DVD-R. Greg Wooledge <wooledg@eeg.ccf.org> - 2018-11-14 14:40 +0100
                Re: Archiving content of a directory on a DVD-R. Jonathan Dowland <jmtd@debian.org> - 2018-11-14 16:40 +0100

csiph-web