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

PATCH: Remove _message call from _mkdir



On Apr 12, 10:18am, Bart Schaefer wrote:
}
} > It works perfectly with all 
} > commands but mkdir, which simply refuses to offer hidden files, ever.
} 
} Which turns out to be that _mkdir calls _message which breaks out of the
} loop over _completers in _main_complete, so the _ignored completer in your
} style is never reached.
} 
} _message really ought to be called only when there is no possibility of
} other completions being generated, not merely to suggest what ought to
} be typed at that point.


Unless someone has a better suggestion?


diff --git a/Completion/Unix/Command/_mkdir b/Completion/Unix/Command/_mkdir
index b5f7519..58d6c74 100644
--- a/Completion/Unix/Command/_mkdir
+++ b/Completion/Unix/Command/_mkdir
@@ -61,7 +61,7 @@ case "$state" in
       [[ $variant == zsh && ${#${${words[2,-1]}:#-*}} -gt 0 ]]; then
       _wanted directories expl \
         'parent directory (alternatively specify name of directory)' \
-        _path_files -/ && ret=0 || _message 'name of directory'
+        _path_files -/ && ret=0
     fi
     ;;
 esac



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