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

Re: PATCH: _cvs should complete dot-files (?)



In article <9907281334.AA33903@xxxxxxxxxxxxxxxxx>,
  Peter Stephenson <pws@xxxxxxxxxxxxxxxxx> writes:

> I can't get this any simple way, nor does the pattern itself seem to be the
> problem.  Is there an easy way of showing it (e.g. with a fixed argument to
> compgen?)

It is reproduced under my Solaris 7 environment.

Z(2):akr@is27e1u11% bin/zsh -f
is27e1u11% autoload -U compinit; compinit -D; compdef _tst tst
is27e1u11% _tst () { compgen -g '(.\#Makefile.in.1.5|<this-part-is-too-long-so-omitted>|.\#params.c.1.46)' }
is27e1u11% tst <TAB>zsh: segmentation fault (core dumped)  bin/zsh -f
Z(2):akr@is27e1u11% 

Z(2):akr@is27e1u11% gdb bin/zsh core
GNU gdb 19981224
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.7"...
Core was generated by `bin/zsh -f'.
Program terminated with signal 11, Segmentation Fault.
Reading symbols from /usr/lib/libsocket.so.1...done.
Reading symbols from /usr/lib/libdl.so.1...done.
Reading symbols from /usr/lib/libnsl.so.1...done.
Reading symbols from /usr/lib/libcurses.so.1...done.
Reading symbols from /usr/lib/libc.so.1...done.
Reading symbols from /usr/lib/libmp.so.2...done.
Reading symbols from /usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1...done.
Reading symbols from /usr/lib/locale/ja/ja.so.2...done.
Reading symbols from /usr/lib/locale/ja/methods_ja.so.2...done.
Reading symbols from /home/fs114/akr/zsh/zsh-debug/lib/zsh/3.1.6-test-3/comp1.so...done.
Reading symbols from /home/fs114/akr/zsh/zsh-debug/lib/zsh/3.1.6-test-3/zle.so...done.
Reading symbols from /home/fs114/akr/zsh/zsh-debug/lib/zsh/3.1.6-test-3/compctl.so...done.
#0  0xff0b051c in makecomplistflags (cc=0x1278b0, s=0xce410 "", incmd=0, 
    compadd=0) at zle_tricky.c:6380
6380                                    pa[o] = '\0';
(gdb) where
#0  0xff0b051c in makecomplistflags (cc=0x1278b0, s=0xce410 "", incmd=0, 
    compadd=0) at zle_tricky.c:6380
#1  0xff0acc70 in makecomplistlist (cc=0x1278b0, s=0xce3e8 "", incmd=0, 
    compadd=0) at zle_tricky.c:5650
#2  0xff0acad4 in makecomplistor (cc=0x1278b0, s=0xce3e8 "", incmd=0, 
    compadd=0, sub=0) at zle_tricky.c:5616
#3  0xff0abac0 in makecomplistcall (cc=0x1278b0) at zle_tricky.c:5335
#4  0xff049650 in bin_compgen (name=0xfbb58 "compgen", argv=0xfbff8, 
    ops=0xffbeb628 "", func=0) at compctl.c:1709
#5  0x1b7dc in execbuiltin (args=0xfbb50, bn=0xff05d660) at builtin.c:366
#6  0x344f4 in execcmd (cmd=0xe3cb0, input=0, output=0, how=2, last1=2)
    at exec.c:2024
#7  0x300e0 in execpline2 (pline=0x112458, how=2, input=0, output=0, last1=0)
    at exec.c:1054
#8  0x2f240 in execpline (l=0x110a90, how=2, last1=0) at exec.c:869
#9  0x2eb68 in execlist (list=0x112398, dont_change_job=1, exiting=0)
    at exec.c:738
#10 0x38048 in runshfunc (list=0x112398, wrap=0x0, name=0x120648 "_tst")
    at exec.c:3019
#11 0xff04bbf0 in comp_wrapper (list=0x112398, w=0x0, name=0x120648 "_tst")
    at compctl.c:2415
#12 0x37f78 in runshfunc (list=0x112398, wrap=0xff05d770, name=0x120648 "_tst")
    at exec.c:3006
#13 0x37c70 in doshfunc (name=0x120648 "_tst", list=0x112398, 
    doshargs=0xfbaa8, flags=0, noreturnval=0) at exec.c:2957
#14 0x37654 in execshfunc (cmd=0xe0ca0, shf=0x112308, args=0xfbaa8)
    at exec.c:2850
#15 0x343f4 in execcmd (cmd=0xe0ca0, input=0, output=0, how=2, last1=2)
    at exec.c:2013
#16 0x300e0 in execpline2 (pline=0x10db98, how=2, input=0, output=0, last1=0)
    at exec.c:1054
#17 0x2f240 in execpline (l=0x110630, how=2, last1=0) at exec.c:869
#18 0x2eb8c in execlist (list=0x10d688, dont_change_job=1, exiting=0)
    at exec.c:744
#19 0x3797c in execautofn (cmd=0x11f058, args=0x0, flags=0) at exec.c:2897
#20 0x34164 in execcmd (cmd=0x11f058, input=0, output=0, how=2, last1=2)
    at exec.c:1976
#21 0x300e0 in execpline2 (pline=0x125ea8, how=2, input=0, output=0, last1=0)
    at exec.c:1054
#22 0x2f240 in execpline (l=0x125108, how=2, last1=0) at exec.c:869
#23 0x2eb68 in execlist (list=0x125ec0, dont_change_job=1, exiting=0)
    at exec.c:738
#24 0x38048 in runshfunc (list=0x125ec0, wrap=0x0, name=0x123820 "_normal")
    at exec.c:3019
#25 0xff04bbf0 in comp_wrapper (list=0x125ec0, w=0x0, name=0x123820 "_normal")
    at compctl.c:2415
#26 0x37f78 in runshfunc (list=0x125ec0, wrap=0xff05d770, 
    name=0x123820 "_normal") at exec.c:3006
#27 0x37c70 in doshfunc (name=0x123820 "_normal", list=0x125ec0, 
    doshargs=0xf1c28, flags=2176, noreturnval=0) at exec.c:2957
#28 0x37654 in execshfunc (cmd=0xe3670, shf=0x125de8, args=0xf1c28)
    at exec.c:2850
#29 0x343f4 in execcmd (cmd=0xe3670, input=0, output=0, how=2, last1=2)
    at exec.c:2013
#30 0x300e0 in execpline2 (pline=0x111400, how=2, input=0, output=0, last1=0)
    at exec.c:1054
#31 0x2f240 in execpline (l=0x10c538, how=2, last1=0) at exec.c:869
#32 0x2eb68 in execlist (list=0x10d718, dont_change_job=1, exiting=0)
    at exec.c:738
#33 0x639b8 in execif (cmd=0xe36c0, args=0x0, flags=0) at loop.c:404
---Type <return> to continue, or q <return> to quit---
#34 0x34164 in execcmd (cmd=0xe36c0, input=0, output=0, how=2, last1=2)
    at exec.c:1976
#35 0x300e0 in execpline2 (pline=0x10f898, how=2, input=0, output=0, last1=0)
    at exec.c:1054
#36 0x2f240 in execpline (l=0x110830, how=2, last1=0) at exec.c:869
#37 0x2eb68 in execlist (list=0x10f428, dont_change_job=1, exiting=0)
    at exec.c:738
#38 0x3797c in execautofn (cmd=0x115c18, args=0x0, flags=0) at exec.c:2897
#39 0x34164 in execcmd (cmd=0x115c18, input=0, output=0, how=2, last1=2)
    at exec.c:1976
#40 0x300e0 in execpline2 (pline=0x11de00, how=2, input=0, output=0, last1=0)
    at exec.c:1054
#41 0x2f240 in execpline (l=0x118978, how=2, last1=0) at exec.c:869
#42 0x2eb68 in execlist (list=0x11de18, dont_change_job=1, exiting=0)
    at exec.c:738
#43 0x38048 in runshfunc (list=0x11de18, wrap=0x0, name=0x11de30 "_complete")
    at exec.c:3019
#44 0xff04bbf0 in comp_wrapper (list=0x11de18, w=0x0, 
    name=0x11de30 "_complete") at compctl.c:2415
#45 0x37f78 in runshfunc (list=0x11de18, wrap=0xff05d770, 
    name=0x11de30 "_complete") at exec.c:3006
#46 0x37c70 in doshfunc (name=0x11de30 "_complete", list=0x11de18, 
    doshargs=0xeae90, flags=2176, noreturnval=0) at exec.c:2957
#47 0x37654 in execshfunc (cmd=0xe3b98, shf=0x11dc08, args=0xeae90)
    at exec.c:2850
#48 0x343f4 in execcmd (cmd=0xe3b98, input=0, output=0, how=2, last1=2)
    at exec.c:2013
#49 0x300e0 in execpline2 (pline=0x112218, how=2, input=0, output=0, last1=0)
    at exec.c:1054
#50 0x2f240 in execpline (l=0x110a10, how=2, last1=0) at exec.c:869
#51 0x2eb68 in execlist (list=0x1121e8, dont_change_job=1, exiting=0)
    at exec.c:738
#52 0x63838 in execif (cmd=0xe3bc0, args=0x0, flags=0) at loop.c:392
#53 0x34164 in execcmd (cmd=0xe3bc0, input=0, output=0, how=2, last1=2)
    at exec.c:1976
#54 0x300e0 in execpline2 (pline=0x10f260, how=2, input=0, output=0, last1=0)
    at exec.c:1054
#55 0x2f240 in execpline (l=0x10c438, how=2, last1=0) at exec.c:869
#56 0x2eb68 in execlist (list=0x112170, dont_change_job=1, exiting=0)
    at exec.c:738
#57 0x62410 in execfor (cmd=0xe3be8, args=0xeae50, flags=0) at loop.c:117
#58 0x34164 in execcmd (cmd=0xe3be8, input=0, output=0, how=2, last1=2)
    at exec.c:1976
#59 0x300e0 in execpline2 (pline=0x10ff90, how=2, input=0, output=0, last1=0)
    at exec.c:1054
#60 0x2f240 in execpline (l=0x10df00, how=2, last1=0) at exec.c:869
#61 0x2eb68 in execlist (list=0x10f320, dont_change_job=1, exiting=0)
    at exec.c:738
#62 0x3797c in execautofn (cmd=0x11eef0, args=0x0, flags=0) at exec.c:2897
#63 0x34164 in execcmd (cmd=0x11eef0, input=0, output=0, how=2, last1=2)
    at exec.c:1976
#64 0x300e0 in execpline2 (pline=0x125bd8, how=2, input=0, output=0, last1=0)
    at exec.c:1054
#65 0x2f240 in execpline (l=0x124f28, how=2, last1=0) at exec.c:869
#66 0x2eb68 in execlist (list=0x125bf0, dont_change_job=1, exiting=0)
    at exec.c:738
#67 0x38048 in runshfunc (list=0x125bf0, wrap=0x0, 
    name=0x117f08 "_main_complete") at exec.c:3019
#68 0xff04bbf0 in comp_wrapper (list=0x125bf0, w=0x0, 
    name=0x117f08 "_main_complete") at compctl.c:2415
---Type <return> to continue, or q <return> to quit---
#69 0x37f78 in runshfunc (list=0x125bf0, wrap=0xff05d770, 
    name=0x117f08 "_main_complete") at exec.c:3006
#70 0x37c70 in doshfunc (name=0x117f08 "_main_complete", list=0x125bf0, 
    doshargs=0x0, flags=0, noreturnval=0) at exec.c:2957
#71 0xff0a95cc in callcompfunc (s=0xce3c0 "", fn=0x117f08 "_main_complete")
    at zle_tricky.c:4781
#72 0xff0a9fa0 in makecomplist (s=0xce3c0 "", incmd=0, lst=0)
    at zle_tricky.c:4938
#73 0xff0a7e24 in docompletion (s=0x1205e8 "", lst=0, incmd=0)
    at zle_tricky.c:4452
#74 0xff09a764 in docomplete (lst=0) at zle_tricky.c:1078
#75 0xff097be8 in expandorcomplete (args=0xff0d80e8) at zle_tricky.c:491
#76 0xff097678 in completecall (args=0xff0d80e8) at zle_tricky.c:390
#77 0xff088974 in execzlefunc (func=0xff0d6044, args=0xff0d80e8)
    at zle_main.c:628
#78 0xff088468 in zleread (lp=0xc9468 "%m%# ", rp=0x0, flags=3)
    at zle_main.c:547
#79 0x54c94 in inputline () at input.c:265
#80 0x54a60 in ingetc () at input.c:210
#81 0x4a980 in ihgetc () at hist.c:242
#82 0x5cb2c in gettok () at lex.c:545
#83 0x5be90 in yylex () at lex.c:308
#84 0x79d24 in parse_event () at parse.c:105
#85 0x514cc in loop (toplevel=1, justonce=0) at init.c:113
#86 0x1a8b8 in main (argc=2, argv=0xffbef494) at ./main.c:89
(gdb) print pa
$1 = "\210.#Makefile.in.1.5\214.#Makefile.in.1.6\214.#Makefile.in.1.7\214.#Makemod.in.in.1.3\214.#builtin.c.1.26\214.#builtin.c.1.27\214.#builtin.c.1.32\214.#builtin.c.1.36\214.#builtin.c.1.41\214.#builtin.c.1.43\214.#cond.c.1.7\214.#cond.c.1"...
(gdb) print o
$2 = 914948096
(gdb) 
-- 
Tanaka Akira



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