about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-07-29 08:39:37 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-07-29 08:39:37 +0000
commit71432c32055b1a07835bcd01ccc6474322b1a862 (patch)
treeffd55a0c36398a2141c657feba3212af33856b56
parentbb21e2531fa9d54b14759cddf4d8f4f831402a2f (diff)
downloadzsh-71432c32055b1a07835bcd01ccc6474322b1a862.tar.gz
zsh-71432c32055b1a07835bcd01ccc6474322b1a862.tar.xz
zsh-71432c32055b1a07835bcd01ccc6474322b1a862.zip
users/13072: add follow option to file-sort
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Unix/Type/_path_files1
-rw-r--r--Doc/Zsh/compsys.yo5
3 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index cd22cf31e..60ef219ec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-07-29  Peter Stephenson  <pws@csr.com>
+
+	* Max Mikhanosha: users/13072: add `follow' option to
+	file-sort style.
+
 2008-07-27  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
 	* following discussion: Src/builtin.c: chnage error message in
diff --git a/Completion/Unix/Type/_path_files b/Completion/Unix/Type/_path_files
index 970c3948a..53c0f2a4a 100644
--- a/Completion/Unix/Type/_path_files
+++ b/Completion/Unix/Type/_path_files
@@ -123,6 +123,7 @@ if zstyle -s ":completion:${curcontext}:" file-sort tmp1; then
   *)                  sort=on;;
   esac
   [[ "$tmp1" = *rev* ]] && sort[1]=O
+  [[ "$tmp1" = *follow* ]] && sort="-$sort"
 
   if [[ "$sort" = on ]]; then
     sort=
diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo
index 9069df466..b70b50297 100644
--- a/Doc/Zsh/compsys.yo
+++ b/Doc/Zsh/compsys.yo
@@ -1494,7 +1494,10 @@ modification time; `tt(access)' to sort by the last access time; and
 `tt(inode)' (or `tt(change)') to sort by the last inode change
 time.  If the style is set to any other value, or is unset, files will be
 sorted alphabetically by name.  If the value contains the string
-`tt(reverse)', sorting is done in the opposite order.
+`tt(reverse)', sorting is done in the opposite order.  If the value
+contains the string `tt(follow)', timestamps are associated with the
+targets of symbolic links; the default is to use the timestamps
+of the links themselves.
 )
 kindex(filter, completion style)
 item(tt(filter))(