Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: fix style insert-ids=single
- X-seq: zsh-workers 26464
- From: Greg Klanderman <gak@xxxxxxxxxxxxxx>
- To: Zsh list <zsh-workers@xxxxxxxxxx>
- Subject: PATCH: fix style insert-ids=single
- Date: Tue, 27 Jan 2009 23:49:54 -0500
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- Reply-to: gak@xxxxxxxxxxxxxx
Hi,
As I reported a few days ago, when completing pids with the style
setting insert-ids=single, it is not possible to enter menu completion
via the menu-complete/menu-select key bindings. This patch fixes this
specific problem, though I cannot claim to understand all the values
that $compstate[insert] can take on well enough to know that there are
not other desirable state transitions still being prevented by this
style setting.
thanks,
Greg
Index: Completion/Unix/Type/_pids
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Type/_pids,v
retrieving revision 1.3
diff -u -r1.3 _pids
--- Completion/Unix/Type/_pids 8 Jun 2005 12:45:36 -0000 1.3
+++ Completion/Unix/Type/_pids 28 Jan 2009 04:26:16 -0000
@@ -45,7 +45,8 @@
case "$out" in
menu) compstate[insert]=menu ;;
- single) [[ $compstate[nmatches] -ne nm+1 ]] && compstate[insert]= ;;
+ single) [[ $compstate[nmatches] -ne nm+1 && $compstate[insert] != menu ]] &&
+ compstate[insert]= ;;
*) [[ ${#:-$PREFIX$SUFFIX} -gt ${#compstate[unambiguous]} ]] &&
compstate[insert]=menu ;;
esac
Messages sorted by:
Reverse Date,
Date,
Thread,
Author