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

[PATCH] Completion: Small fixes for _jq and _ldd


Someone on IRC complained that the jq completer doesn't complete file paths.
Sure enough, there's a small bug there. Fixed that.

Also, in workers # 42236 i mentioned that the ldd completer doesn't work on
Linux (or not on Ubuntu, anyway) because the 'gnu' variant detection is broken.
I submitted a patch at the time but it was probably missed because i didn't mark
it as such. Here it is again.


diff --git a/Completion/Unix/Command/_jq b/Completion/Unix/Command/_jq
index 55bb93c04..4ff05dab4 100644
--- a/Completion/Unix/Command/_jq
+++ b/Completion/Unix/Command/_jq
@@ -31,4 +31,4 @@ _arguments -S -s : \
   '*--argjson[pre-set a variable to an object]: :_guard "|[A-Za-z][A-Za-z0-9]#" "variable name":value (JSON): ' \
   '*--slurpfile[pre-set a variable to contents of a file]: :_guard "|[A-Za-z][A-Za-z0-9]#" "variable name":value (filename of file containing JSON):_files' \
   "1: :_guard '|[^-]' filter" \
-  "*:_files"
+  "*: :_files"

diff --git a/Completion/Unix/Command/_ldd b/Completion/Unix/Command/_ldd
index 19b8a9105..1de1659a5 100644
--- a/Completion/Unix/Command/_ldd
+++ b/Completion/Unix/Command/_ldd
@@ -1,6 +1,6 @@
 #compdef ldd
-if _pick_variant gnu='(GNU|EGLIBC|Gentoo)' unix --version; then
+if _pick_variant gnu='(Free Soft|GNU|EGLIBC|Gentoo)' unix --version; then
     '(- *)--version[display version information]'
     '(- *)--help[display help information]'

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