From 91dd5bd61d63a300761352fa62c702af2fdd7c85 Mon Sep 17 00:00:00 2001 From: Artur Adib Date: Tue, 1 Jan 2013 15:26:53 -0500 Subject: [PATCH] docs fix --- README.md | 10 +++++++++- shell.js | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 28a5f9d..250e5d9 100644 --- a/README.md +++ b/README.md @@ -353,9 +353,11 @@ like `.to()`. ### dirs([options | '+N' | '-N']) Available options: + + `-c`: Clears the directory stack by deleting all of the elements. Arguments: + + `+N`: Displays the Nth directory (counting from the left of the list printed by dirs when invoked without options), starting with zero. + `-N`: Displays the Nth directory (counting from the right of the list printed by dirs when invoked without options), starting with zero. @@ -366,14 +368,17 @@ See also: pushd, popd ### pushd([options,] [dir | '-N' | '+N']) Available options: + + `-n`: Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated. -Arguments +Arguments: + + `dir`: Makes the current working directory be the top of the stack, and then executes the equivalent of `cd dir`. + `+N`: Brings the Nth directory (counting from the left of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. + `-N`: Brings the Nth directory (counting from the right of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. Examples: + ```javascript // process.cwd() === '/usr' pushd('/etc'); // Returns /etc /usr @@ -385,13 +390,16 @@ Save the current directory on the top of the directory stack and then cd to `dir ### popd([options,] ['-N' | '+N']) Available options: + + `-n`: Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated. Arguments: + + `+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. Examples: + ```javascript echo(process.cwd()); // '/usr' pushd('/etc'); // '/etc /usr' diff --git a/shell.js b/shell.js index 5e5e9a9..6e470fe 100644 --- a/shell.js +++ b/shell.js @@ -889,9 +889,11 @@ function _actualDirStack() { //@ ### dirs([options | '+N' | '-N']) //@ //@ Available options: +//@ //@ + `-c`: Clears the directory stack by deleting all of the elements. //@ //@ Arguments: +//@ //@ + `+N`: Displays the Nth directory (counting from the left of the list printed by dirs when invoked without options), starting with zero. //@ + `-N`: Displays the Nth directory (counting from the right of the list printed by dirs when invoked without options), starting with zero. //@ @@ -935,14 +937,17 @@ exports.dirs = wrap("dirs", _dirs); //@ ### pushd([options,] [dir | '-N' | '+N']) //@ //@ Available options: +//@ //@ + `-n`: Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated. //@ -//@ Arguments +//@ Arguments: +//@ //@ + `dir`: Makes the current working directory be the top of the stack, and then executes the equivalent of `cd dir`. //@ + `+N`: Brings the Nth directory (counting from the left of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. //@ + `-N`: Brings the Nth directory (counting from the right of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. //@ //@ Examples: +//@ //@ ```javascript //@ // process.cwd() === '/usr' //@ pushd('/etc'); // Returns /etc /usr @@ -997,13 +1002,16 @@ exports.pushd = wrap('pushd', _pushd); //@ ### popd([options,] ['-N' | '+N']) //@ //@ Available options: +//@ //@ + `-n`: Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated. //@ //@ Arguments: +//@ //@ + `+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. //@ //@ Examples: +//@ //@ ```javascript //@ echo(process.cwd()); // '/usr' //@ pushd('/etc'); // '/etc /usr'