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

PATCH: _whois



I modified _whois to complete arguments of fwhois.

And I found a problem.

Z:akr@is27e1u11% Src/zsh -f
is27e1u11% bindkey -e; fpath=($PWD/Completion/*(/)); autoload -U compinit; compinit -D; compdef _tst tst
is27e1u11% compconf group_matches=yes message_format='%d' description_format='%d'
is27e1u11% compconf describe_options=yes describe_values=yes option_prefix=yes
is27e1u11% comptag argument='*=1' option='*=2[describe]' glob='*=1' path='*=2' file='*=3'
is27e1u11% fwhois 'DOMAIN <TAB>
zsh: segmentation fault (core dumped)  Src/zsh -f

(gdb) where
#0  0xff136d84 in strlen ()
#1  0xa15d0 in bslashquote (s=0x0, e=0x0, instring=1) at utils.c:3011
#2  0xff06da80 in multiquote (s=0x0, ign=1) at compcore.c:933
#3  0xff071348 in addmatches (dat=0xffbe7280, argv=0x1d2634) at compcore.c:1711
#4  0xff068238 in bin_compadd (name=0x1d24f0 "compadd", argv=0x1d2634, 
    ops=0xffbe7388 "", func=0) at complete.c:606
...

This may relate to 8588 since _whois use `compset -q'.

Index: Completion/User/_whois
===================================================================
RCS file: /projects/zsh/zsh/Completion/User/_whois,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 _whois
--- Completion/User/_whois	1999/11/02 12:26:46	1.1.1.3
+++ Completion/User/_whois	1999/11/08 22:04:47
@@ -1,8 +1,11 @@
-#compdef whois
+#compdef whois fwhois
 
 _whois () {
   _whois_setup
-  $_whois_comp
+  case "$0" in
+  fwhois) _whois_fwhois;;
+  *) $_whois_comp;;
+  esac
 }
 
 (( $+functions[_whois_setup] )) ||
-- 
Tanaka Akira



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