popd e pushd behavior com opção "-n"

1

Eu tenho experimentado com pushd e popd no bash (Cygwin, man page diz "GNU bash 4.1") e a página de manual não parece exatamente combinar com o comportamento.

Para pushd , o comando

% pushd +1

gira a pilha e altera o diretório de trabalho;

% pushd -n +1

apenas gira a pilha. Isso parece coincidir com a página do manual.

Mas

% popd +1 

remove uma entrada da pilha, mas NÃO altera o diretório de trabalho (mesmo que "-n" não tenha sido fornecido). Isso não parece coincidir com a página do manual, citada abaixo:

Arguments, if supplied, have the following meanings:
    -n   Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated.
    +n   Removes the nth entry counting from the left of the list shown by dirs, starting with zero.  For example: “popd +0” removes the first directory, “popd +1” the second.

É assim que é suposto ser?

    
por Carl Witthoft 17.07.2014 / 16:08

0 respostas

Tags

yii\base\ErrorException
Copied! Copy Stacktrace Search Stackoverflow Search Google Error

PHP Core Warning – yii\base\ErrorException

PHP Startup: Unable to load dynamic library 'memcached.so' (tried: /usr/lib/php/20190902/memcached.so (/usr/lib/php/20190902/memcached.so: undefined symbol: igbinary_serialize), /usr/lib/php/20190902/memcached.so.so (/usr/lib/php/20190902/memcached.so.so: cannot open shared object file: No such file or directory))

$_GET = [
    'id' => '467813',
    'url' => 'popd-and-pushd-behavior-with-n-option',
];

$_COOKIE = [
    '_csrf-frontend' => '0932dbe8562d629002ef1020020d601a8ef415cdebc6d6eb80f24c63356391cea:2:{i:0;s:14:"_csrf-frontend";i:1;s:32:"cbN4gABKKhfA8vGYt0ewTbegGh85zso0";}',
    'advanced-frontend' => 'b2a5d51m82oog5ndabi66l9h5c',
];

$_SESSION = [
    '__flash' => [],
];