bug-bash
[Top][All Lists]
Advanced

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

Is this intended behavior??


From: Bruce Korb
Subject: Is this intended behavior??
Date: Mon, 11 Feb 2013 11:25:04 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130105 Thunderbird/17.0.2

> /tmp
> $ echo "$PS1"
> \w\n\$ 
> /tmp
> $ mkdir -p ZZ/a/b/c
> /tmp
> $ pushd ZZ
> /tmp/ZZ /tmp
> /tmp/ZZ
> $ pushd a
> /tmp/ZZ/a /tmp/ZZ /tmp
> /tmp/ZZ/a
> $ pushd b/c
> /tmp/ZZ/a/b/c /tmp/ZZ/a /tmp/ZZ /tmp
> /tmp/ZZ/a/b/c
> $ popd /var/tmp
> /tmp/ZZ/a/b/c /tmp/ZZ/a /tmp/ZZ
> /tmp/ZZ/a/b/c
> $ popd /var/tmp
> /tmp/ZZ/a/b/c /tmp/ZZ/a
> /tmp/ZZ/a/b/c
> $ 

It is behaving as if it were seeing the "-0" option.
But it really isn't the -0 option.  The `-N' option
probably should mention (just for clarity) that the
directory is left unchanged, just as with '-n'.

`popd'
          popd [+N | -N] [-n]

     Remove the top entry from the directory stack, and `cd' to the new
     top directory.  When no arguments are given, `popd' removes the
     top directory from the stack and performs a `cd' to the new top
     directory.  The elements are numbered from 0 starting at the first
     directory listed with `dirs'; i.e., `popd' is equivalent to `popd
     +0'.
    `+N'
          Removes the Nth directory (counting from the left of the list
          printed by `dirs'), starting with zero.

    `-N'
          Removes the Nth directory (counting from the right of the
          list printed by `dirs'), starting with zero.

    `-n'
          Suppresses the normal change of directory when removing
          directories from the stack, so that only the stack is
          manipulated.



reply via email to

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