mirror of git://git.code.sf.net/p/zsh/code
31592: improve documentary for handling of named directories.
Minor changes of phrasing.
This commit is contained in:
parent
c5d9abc6c8
commit
5b85ac9011
|
@ -1,3 +1,9 @@
|
|||
2013-07-28 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
||||
|
||||
* Manuel Presnitz: 31592 (with minor changes of phrasing):
|
||||
Doc/Zsh/builtins.yo, Doc/Zsh/expn.yo, Doc/Zsh/prompt.yo: improve
|
||||
documentation for named directory handling.
|
||||
|
||||
2013-07-25 Peter Stephenson <p.stephenson@samsung.com>
|
||||
|
||||
* Jun T.: 31756: Completion/Unix/Command/_make: further make
|
||||
|
|
|
@ -277,7 +277,9 @@ item(tt(-c))(
|
|||
clear the directory stack.
|
||||
)
|
||||
item(tt(-l))(
|
||||
print directory names in full instead of using of using tt(~) expressions.
|
||||
print directory names in full instead of using of using tt(~) expressions (\
|
||||
ifzman(see em(Dynamic) and em(Static named directories) in zmanref(zshexpn))\
|
||||
ifnzman(noderef(Filename Expansion))).
|
||||
)
|
||||
item(tt(-p))(
|
||||
print directory entries one per line.
|
||||
|
|
|
@ -1708,14 +1708,14 @@ Note that trailing slashes will be removed from the path to the directory
|
|||
It is also possible to define directory names using the tt(-d) option to the
|
||||
tt(hash) builtin.
|
||||
|
||||
In certain circumstances (in prompts, for instance), when the shell
|
||||
prints a path, the path is checked to see if it has a named
|
||||
directory as its prefix. If so, then the prefix portion
|
||||
is replaced with a `tt(~)' followed by the name of the directory.
|
||||
The shortest way of referring to the directory is used,
|
||||
with ties broken in favour of using a named directory,
|
||||
except when the directory is tt(/) itself. The parameters tt($PWD) and
|
||||
tt($OLDPWD) are never abbreviated in this fashion.
|
||||
When the shell prints a path (e.g. when expanding tt(%~) in prompts or when
|
||||
printing the directory stack), the path is checked to see if it has a named
|
||||
directory as its prefix. If so, then the prefix portion is replaced with a
|
||||
`tt(~)' followed by the name of the directory.
|
||||
The shorter of the two ways of referring to the directory is used,
|
||||
i.e. either the directory name or the full path; the name is used
|
||||
if they are the same length.
|
||||
The parameters tt($PWD) and tt($OLDPWD) are never abbreviated in this fashion.
|
||||
|
||||
subsect(`=' expansion)
|
||||
|
||||
|
|
|
@ -100,10 +100,13 @@ directory to show; zero means the whole path. A negative integer
|
|||
specifies leading components, i.e. tt(%-1d) specifies the first component.
|
||||
)
|
||||
item(tt(%~))(
|
||||
As tt(%d) and tt(%/), but if the current working directory has a named
|
||||
As tt(%d) and tt(%/), but if the current working directory starts with
|
||||
tt($HOME), that part is replaced by a `tt(~)'. Furthermore, if it has a named
|
||||
directory as its prefix, that part is replaced by a `tt(~)' followed by
|
||||
the name of the directory. If it starts with tt($HOME), that part is
|
||||
replaced by a `tt(~)'.
|
||||
the name of the directory, but only if the result is shorter than
|
||||
the full path;
|
||||
ifzman(see em(Dynamic) and em(Static named directories) in zmanref(zshexpn))\
|
||||
ifnzman(noderef(Filename Expansion)).
|
||||
)
|
||||
xitem(tt(%h))
|
||||
item(tt(%!))(
|
||||
|
|
Loading…
Reference in New Issue