about summary refs log tree commit diff
path: root/Doc
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2016-07-30 16:16:22 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2016-08-22 03:34:30 +0000
commit7154052ebe3d810390164a05c39ff83f98a1d858 (patch)
treede329087e802a17df0dd93aee35fdb5e49b25ac3 /Doc
parent4b2810ab2d6be3d1cf811e53d3b4f57630821108 (diff)
downloadzsh-7154052ebe3d810390164a05c39ff83f98a1d858.tar.gz
zsh-7154052ebe3d810390164a05c39ff83f98a1d858.tar.xz
zsh-7154052ebe3d810390164a05c39ff83f98a1d858.zip
39046 + 39061: New :P history modifier.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/Zsh/contrib.yo2
-rw-r--r--Doc/Zsh/expn.yo9
2 files changed, 10 insertions, 1 deletions
diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo
index 00ed08029..63df292ac 100644
--- a/Doc/Zsh/contrib.yo
+++ b/Doc/Zsh/contrib.yo
@@ -3477,7 +3477,7 @@ will ensure that any files found in that area will be executed as MIME
 types even if they are executable.  As this example shows, the complete
 file name is matched against the pattern, regardless of how the file
 was passed to the handler.  The file is resolved to a full path using
-the tt(:A) modifier described in
+the tt(:P) modifier described in
 ifzman(the subsection Modifiers in zmanref(zshexpn))\
 ifnzman(noderef(Modifiers));
 this means that symbolic links are resolved where possible, so that
diff --git a/Doc/Zsh/expn.yo b/Doc/Zsh/expn.yo
index ca4b94f5e..ecb1877a2 100644
--- a/Doc/Zsh/expn.yo
+++ b/Doc/Zsh/expn.yo
@@ -240,6 +240,7 @@ function, symbolic links are not resolved, so on those systems `tt(a)' and
 `tt(A)' are equivalent.
 
 Note: tt(foo:A) and tt(realpath+LPAR()foo+RPAR()) are different on some inputs.
+For tt(realpath+LPAR()foo+RPAR()) semantics, see the `tt(P)` modifier.
 )
 item(tt(c))(
 Resolve a command name into an absolute path by searching the command
@@ -265,6 +266,14 @@ item(tt(p))(
 Print the new command but do not execute it.  Only works with history
 expansion.
 )
+item(tt(P))(
+Turn a file name into an absolute path, like tt(realpath+LPAR()3+RPAR()).
+The resulting path will be absolute, have neither `tt(.)' nor `tt(..)' components,
+and refer to the same directory entry as the input filename.
+
+Unlike tt(realpath+LPAR()3+RPAR()), non-existent trailing components are
+permitted and preserved.
+)
 item(tt(q))(
 Quote the substituted words, escaping further substitutions.  Works
 with history expansion and parameter expansion, though for parameters