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

uhmm, another segmentation fault

Is this the month of zsh bugs? :-)

 lama:~>mutt ali<TAB>
 interactive: ali[]
 - corrections -
 alex                             -- "Alexandra Probst" <Alexandra.Probst@xxxxxxxxx>
 alle                             -- "KasCada alle" <alle@xxxxxxxxxxx>
 angi                             -- "Angi Mayr" <angi@xxxxxxxxx>
 lalo                             -- "Eduardo Carrera" <eduardocarrera2001@xxxxxxxxx
 - original -

Then I pressed "c" and whooooie:
 lama:~>mutt ali[1]    30401 segmentation fault (core dumped)  zsh


 lama:~>print ${_comps[mutt]}    
 lama:~>grep mutt .zsh/complete
  muttaliases=( `~/bin/list.mail.aliases` )
  muttusers=( $muttaliases )
  mailusers=( $users `~/bin/list.mail.aliases -f` )
  # _mutt_aliases=(${(o)${${(M)${(f)"$(< ~/.mutt/aliases)"}##alias*}/alias /}%% *})

  # to use these variables in all contexts
  zstyle ':completion:*:mutt:*' users $muttusers
  zstyle ':completion:*:mail:*' users $mailusers
  zstyle ':completion:*:checkalias:*' users $muttaliases

  # where to find mutt "mailboxes" and "alias" settings

 lama:~>gdb zsh core
 GNU gdb 6.6-debian
 Core was generated by `zsh'.
 Program terminated with signal 11, Segmentation fault.
 #0  0x40281b0c in doinsert (zstr=0xbfdb7a80, len=1) at ../../../Src/Zle/zle_misc.c:54
 54      ../../../Src/Zle/zle_misc.c: No such file or directory.
         in ../../../Src/Zle/zle_misc.c
 (gdb) bt
 #0  0x40281b0c in doinsert (zstr=0xbfdb7a80, len=1) at ../../../Src/Zle/zle_misc.c:54
 #1  0x40281ba6 in selfinsert (args=0x4029b27c) at ../../../Src/Zle/zle_misc.c:71
 #2  0x402d9197 in domenuselect (dummy=0x402b9834, dat=0xbfdb7f6c) at ../../../Src/Zle/complist.c:2546
 #3  0x0808ba8a in runhookdef (h=0x402b9834, d=0xbfdb7f6c) at ../../Src/module.c:1870
 #4  0x402aad60 in after_complete (dummy=0x4029afbc, dat=0xbfdb80a4) at ../../../Src/Zle/compcore.c:515
 #5  0x4028e09f in docomplete (lst=0) at ../../../Src/Zle/zle_tricky.c:869
 #6  0x402899e0 in completecall (args=0xbfdb83a4) at ../../../Src/Zle/zle_tricky.c:208
 #7  0x4027da0a in execzlefunc (func=0x40298398, args=0xbfdb83a4, set_bindk=0) at ../../../Src/Zle/zle_main.c:1254
 #8  0x402894c6 in bin_zle_call (name=0x4023e398 "zle", args=0xbfdb83a0, ops=0xbfdb83ec, func=0 '\0') at ../../../Src/Zle/zle_thingy.c:705
 #9  0x402885e3 in bin_zle (name=0x4023e398 "zle", args=0xbfdb83a0, ops=0xbfdb83ec, func=0) at ../../../Src/Zle/zle_thingy.c:381
 #10 0x0805d183 in execbuiltin (args=0x4023e370, bn=0x4029b068) at ../../Src/builtin.c:438
 #11 0x0806aeef in execcmd (state=0xbfdb97a8, input=0, output=0, how=2, last1=2) at ../../Src/exec.c:2670
 #12 0x0806b199 in execpline2 (state=0xbfdb97a8, pcode=<value optimized out>, how=2, input=0, output=0, last1=0) at ../../Src/exec.c:1343
 #13 0x0806b56b in execpline (state=0xbfdb97a8, slcode=<value optimized out>, how=2, last1=0) at ../../Src/exec.c:1129
 #14 0x0806c255 in execlist (state=0xbfdb97a8, dont_change_job=1, exiting=0) at ../../Src/exec.c:935
 #15 0x0806c4da in execode (p=0x818ad68, dont_change_job=1, exiting=0) at ../../Src/exec.c:793
 #16 0x0806c5c3 in runshfunc (prog=0x818ad68, wrap=0x0, name=0x4023e2e0 "complete-word-with-dots") at ../../Src/exec.c:3991
 #17 0x0806c937 in doshfunc (name=0x80ef3b8 "complete-word-with-dots", prog=0x818ad68, doshargs=0x0, flags=0, noreturnval=1)
     at ../../Src/exec.c:3900
 #18 0x4027d863 in execzlefunc (func=0x818ada0, args=0x4029b27c, set_bindk=0) at ../../../Src/Zle/zle_main.c:1296
 #19 0x4027dbea in zlecore () at ../../../Src/Zle/zle_main.c:1019
 #20 0x4027e217 in zleread (lp=0x80d65b4, rp=0x0, flags=3, context=0) at ../../../Src/Zle/zle_main.c:1174
 #21 0x0807dea6 in ingetc () at ../../Src/input.c:278
 #22 0x080795e2 in ihgetc () at ../../Src/hist.c:240
 #23 0x08084eee in gettok () at ../../Src/lex.c:630
 #24 0x0808571a in yylex () at ../../Src/lex.c:345
 #25 0x0809d769 in parse_event () at ../../Src/parse.c:451
 #26 0x0807c87a in loop (toplevel=1, justonce=0) at ../../Src/init.c:128
 #27 0x0807d594 in zsh_main (argc=1, argv=0xbfdba394) at ../../Src/init.c:1347
 #28 0x08054872 in main (argc=Cannot access memory at address 0x0) at ../../Src/main.c:93


 GNU GPL: "The source will be with you... always."

# ASp: list mail aliases (for zsh mutt-completion etc.)

# Options:
#  -f lists the expanded addresses
#  -p lists the pairs alias=address

if [ x"$1" = x-f ]; then
  #sed -e '/^alias [^-]/!d' -e '/<.*>/!d' -e 's/.*<\(.*\)>.*/\1/g' ~/.mutt/aliases
  #or like this:
  perl -n -e 'if (/^alias [^-].*<.*>/) { s/^alias +([^<]*)<([^>]+)>(.*)/\2/; print}' ~/.mutt/aliases
elif [ x"$1" = x-p ]; then
  perl -n -e 'if (/^alias [^-].*<.*>/) { s/^alias +([^ ]*).*<([^>]+)>(.*)/\1 = \2/; print}' ~/.mutt/aliases
  grep "^alias" $HOME/.mutt/aliases | grep -v "\-\-" | awk '{ print $2 }'
  #or like this:
  # awk '/^alias/ { print $2; }' ~/.mutt/aliases | grep -v "\-\-"

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