Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: Modifiers that implement realpath-like feature



On Sat, 14 Mar 2009 14:27:09 -0700 (PDT)
Michael Hwang <nomex45@xxxxxxxxx> wrote:
> Sorry, here.

Thanks, that seems to work well.  I'll commit it with the following
documentation.  (Larger than necessary since I've taken the opportunity
to reorder modifiers to alphabetical order since no other is particular
obvious---with the exception that `&' follows `s' since ASCII order for
that isn't particularly obvious either.)

Index: Doc/Zsh/expn.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/expn.yo,v
retrieving revision 1.102
diff -u -r1.102 expn.yo
--- Doc/Zsh/expn.yo	6 Feb 2009 09:59:38 -0000	1.102
+++ Doc/Zsh/expn.yo	15 Mar 2009 01:03:57 -0000
@@ -216,20 +216,24 @@
 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 @@
 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 @@
 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


-- 
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/



Messages sorted by: Reverse Date, Date, Thread, Author