about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Builtins/_zstyle19
-rw-r--r--Completion/Core/_path_files4
2 files changed, 12 insertions, 11 deletions
diff --git a/Completion/Builtins/_zstyle b/Completion/Builtins/_zstyle
index cd470598a..f2a43b180 100644
--- a/Completion/Builtins/_zstyle
+++ b/Completion/Builtins/_zstyle
@@ -11,9 +11,10 @@ typeset -A styles
 styles=(
   accept-exact		 c:bool
   add-space		 c:bool
+  ambiguous              c:bool
   arguments		 c:
   auto-description	 c:
-  break                  c:
+  break-keys             c:
   completer		 c:completer
   completions		 c:
   condition		 c:
@@ -22,6 +23,7 @@ styles=(
   domains                c:
   expand		 c:
   file-patterns		 c:filepat
+  file-sort              c:fsort
   format		 c:
   glob			 c:
   group-name		 c:
@@ -58,6 +60,7 @@ styles=(
   special-dirs		 c:sdirs
   squeeze-slashes	 c:bool
   stop			 c:stop
+  stop-keys		 c:
   subst-glob-only        c:
   substitute		 c:
   tag-order		 c:tag
@@ -134,14 +137,7 @@ while [[ -n $state ]]; do
       ;;
 
     cursor)
-      if [[ "$words[2]" = *:completion:inc* ]]; then
-        _wanted values expl 'cursor positioning' compadd complete key default
-      elif [[ "$words[2]" = *:completion::* ]]; then
-        _wanted values expl 'cursor positioning' compadd true false
-      else
-        _wanted values expl 'cursor positioning' \
-	  compadd complete key default true false
-      fi
+      _wanted values expl 'cursor positioning' compadd complete key default
       ;;
 
     completer)
@@ -150,6 +146,11 @@ while [[ -n $state ]]; do
                 _expand _list _menu _oldlist _next_tags
       ;;
 
+    fsort)
+      _wanted values expl 'how to sort files' \
+	compadd name size links time date modification access inode change reverse
+      ;;
+
     user-host-port)
       if [[ $PREFIX != *[@:]* ]]; then
 	_users -S @
diff --git a/Completion/Core/_path_files b/Completion/Core/_path_files
index 2c5362e17..183d59af3 100644
--- a/Completion/Core/_path_files
+++ b/Completion/Core/_path_files
@@ -86,7 +86,7 @@ if (( ! $mopts[(I)-[JVX]] )); then
   mopts=( "$mopts[@]" "$expl[@]" )
 fi
 
-if zstyle -s ":completion:${curcontext}:files" sort tmp1; then
+if zstyle -s ":completion:${curcontext}:files" file-sort tmp1; then
   case "$tmp1" in
   *size*)             sort=oL;;
   *links*)            sort=ol;;
@@ -464,7 +464,7 @@ for prepath in "$prepaths[@]"; do
 
       if [[ -n $menu || -z "$compstate[insert]" ]] ||
          ! zstyle -t ":completion:${curcontext}:paths" expand suffix; then
-        (( tmp4 )) && zstyle -t ":completion:${curcontext}:paths" cursor &&
+        (( tmp4 )) && zstyle -t ":completion:${curcontext}:paths" ambiguous &&
             compstate[to_end]=''
         if [[ "$tmp3" = */* ]]; then
 	  compadd -Qf "$mopts[@]" -p "$linepath$tmp2" -s "/${tmp3#*/}" \