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

PATCH: pid completion from gdb



Completion of pids is not working correctly after gdb's --pid= option.
This is in the case where it uses compadd -U, it doesn't allow for
IPREFIX. I'm not sure what the reason for compadd not doing this itself
would be.

Oliver

diff --git a/Completion/Unix/Type/_pids b/Completion/Unix/Type/_pids
index cf90005..dd8ef44 100644
--- a/Completion/Unix/Type/_pids
+++ b/Completion/Unix/Type/_pids
@@ -15,7 +15,7 @@ elif [[ "$PREFIX$SUFFIX" = ([%-]*|[0-9]#) ]]; then
   all=()
   match="(*[[:blank:]]|)${PREFIX}[0-9]#${SUFFIX}[[:blank:]]*"
 else
-  all=(-U)
+  all=(-P "$IPREFIX" -S "$ISUFFIX" -U)
   match="*[[:blank:]]*[[/[:blank:]]$PREFIX*$SUFFIX*"
   nm="$compstate[nmatches]"
 fi



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