help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: To have in bash variable, a directory just've been pushed


From: Lawrence Velázquez
Subject: Re: To have in bash variable, a directory just've been pushed
Date: Mon, 19 Apr 2021 14:00:28 -0400
User-agent: Cyrus-JMAP/3.5.0-alpha0-379-g3e3377039f-fm-20210419.003-g3e337703

On Mon, Apr 19, 2021, at 1:56 PM, Budi wrote:
> How do I use, i.e. to have in bash variable, a directory just've been
> pushed by pushd and not to do popd command ?

       DIRSTACK
              An array variable (see Arrays below) containing the current con-
              tents of the directory stack.  Directories appear in  the  stack
              in  the order they are displayed by the dirs builtin.  Assigning
              to members of this array variable may be used to modify directo-
              ries  already in the stack, but the pushd and popd builtins must
              be used to add and remove directories.  Assignment to this vari-
              able  will  not  change  the  current directory.  If DIRSTACK is
              unset, it loses its special properties, even  if  it  is  subse-
              quently reset.

-- 
vq



reply via email to

[Prev in Thread] Current Thread [Next in Thread]