summaryrefslogtreecommitdiff
path: root/Doc/help/cd
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2020-02-16 03:29:19 +0100
committerAxel Beckert <abe@deuxchevaux.org>2020-02-16 03:29:19 +0100
commit2794556a41b50f635b6aa49c32fc6ca7bc08c901 (patch)
tree9557d7a073d4b24e9f10cdc337d9a819eb65ad1a /Doc/help/cd
parentb0d5cb56971618762ab13dbdb8fb17753f07f0f6 (diff)
parent94c033d2e281eb1f49e8366d21fc259ce8c0c4f5 (diff)
downloadzsh-2794556a41b50f635b6aa49c32fc6ca7bc08c901.tar.gz
zsh-2794556a41b50f635b6aa49c32fc6ca7bc08c901.zip
Update upstream source from tag 'upstream/5.8'
Update to upstream version '5.8' with Debian dir b7a9cb7b782a12a49dca06e06ca2554b5a95bf93
Diffstat (limited to 'Doc/help/cd')
-rw-r--r--Doc/help/cd54
1 files changed, 54 insertions, 0 deletions
diff --git a/Doc/help/cd b/Doc/help/cd
new file mode 100644
index 000000000..34c6ad936
--- /dev/null
+++ b/Doc/help/cd
@@ -0,0 +1,54 @@
+cd [ -qsLP ] [ arg ]
+cd [ -qsLP ] old new
+cd [ -qsLP ] {+|-}n
+ Change the current directory. In the first form, change the
+ current directory to arg, or to the value of $HOME if arg is not
+ specified. If arg is `-', change to the previous directory.
+
+ Otherwise, if arg begins with a slash, attempt to change to the
+ directory given by arg.
+
+ If arg does not begin with a slash, the behaviour depends on
+ whether the current directory `.' occurs in the list of directo-
+ ries contained in the shell parameter cdpath. If it does not,
+ first attempt to change to the directory arg under the current
+ directory, and if that fails but cdpath is set and contains at
+ least one element attempt to change to the directory arg under
+ each component of cdpath in turn until successful. If `.' oc-
+ curs in cdpath, then cdpath is searched strictly in order so
+ that `.' is only tried at the appropriate point.
+
+ The order of testing cdpath is modified if the option POSIX_CD
+ is set, as described in the documentation for the option.
+
+ If no directory is found, the option CDABLE_VARS is set, and a
+ parameter named arg exists whose value begins with a slash,
+ treat its value as the directory. In that case, the parameter
+ is added to the named directory hash table.
+
+ The second form of cd substitutes the string new for the string
+ old in the name of the current directory, and tries to change to
+ this new directory.
+
+ The third form of cd extracts an entry from the directory stack,
+ and changes to that directory. An argument of the form `+n'
+ identifies a stack entry by counting from the left of the list
+ shown by the dirs command, starting with zero. An argument of
+ the form `-n' counts from the right. If the PUSHD_MINUS option
+ is set, the meanings of `+' and `-' in this context are swapped.
+ If the POSIX_CD option is set, this form of cd is not recognised
+ and will be interpreted as the first form.
+
+ If the -q (quiet) option is specified, the hook function chpwd
+ and the functions in the array chpwd_functions are not called.
+ This is useful for calls to cd that do not change the environ-
+ ment seen by an interactive user.
+
+ If the -s option is specified, cd refuses to change the current
+ directory if the given pathname contains symlinks. If the -P
+ option is given or the CHASE_LINKS option is set, symbolic links
+ are resolved to their true values. If the -L option is given
+ symbolic links are retained in the directory (and not resolved)
+ regardless of the state of the CHASE_LINKS option.
+
+chdir Same as cd.