1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-22 16:20:23 +02:00

Michael Hwang: 26731 with cosmetic changes: add "a" and "A" modifiers

26736: document the above
This commit is contained in:
Peter Stephenson 2009-03-15 01:17:05 +00:00
parent bf25c3a43f
commit 7733ade831
4 changed files with 190 additions and 19 deletions

View file

@ -216,20 +216,24 @@ of em(filename generation) and em(parameter expansion), except where
noted.
startitem()
item(tt(h))(
Remove a trailing pathname component, leaving the head. This works
like `tt(dirname)'.
item(tt(a))(
Turn a file name into an absolute path: prepends the current directory,
if necessary, and resolves any use of `tt(..)' and `tt(.)' in the path.
)
item(tt(r))(
Remove a filename extension of the form `tt(.)var(xxx)', leaving
the root name.
item(tt(A))(
As `tt(a)', but also resolve use of symbolic links where possible.
Note that resolution of `tt(..)' occurs em(before) resolution of symbolic
links.
)
item(tt(e))(
Remove all but the extension.
)
item(tt(t))(
Remove all leading pathname components, leaving the tail. This works
like `tt(basename)'.
item(tt(h))(
Remove a trailing pathname component, leaving the head. This works
like `tt(dirname)'.
)
item(tt(l))(
Convert the words to all lowercase.
)
item(tt(p))(
Print the new command but do not execute it. Only works with history
@ -244,15 +248,9 @@ by tt(eval).
item(tt(Q))(
Remove one level of quotes from the substituted words.
)
item(tt(x))(
Like tt(q), but break into words at whitespace. Does not work with
parameter expansion.
)
item(tt(l))(
Convert the words to all lowercase.
)
item(tt(u))(
Convert the words to all uppercase.
item(tt(r))(
Remove a filename extension of the form `tt(.)var(xxx)', leaving
the root name.
)
item(tt(s/)var(l)tt(/)var(r)[tt(/)])(
Substitute var(r) for var(l) as described below.
@ -272,6 +270,17 @@ immediately by a tt(g). In parameter expansion the tt(&) must appear
inside braces, and in filename generation it must be quoted with a
backslash.
)
item(tt(t))(
Remove all leading pathname components, leaving the tail. This works
like `tt(basename)'.
)
item(tt(u))(
Convert the words to all uppercase.
)
item(tt(x))(
Like tt(q), but break into words at whitespace. Does not work with
parameter expansion.
)
enditem()
The tt(s/l/r/) substitution works as follows. By default the left-hand