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

Some (completeinword , _match) oddities



This is zsh-3.1.6-bart-8 with all patches (except for export files)

1. completeinword

zsh -f
itsrm2% autoload compinit; compinit -D
itsrm2% bindkey -e
itsrm2% setopt completeinword
itsrm2% ls /u/i/f<CURSOR>.h<TAB>
itsrm2% ls /usr/include/f<CURSOR>.h<TAB>
itsrm2% ls /usr/include/f.h
fatal.h     filehdr.h   fmtmsg.h    form.h      ftapi.h
fcntl.h     float.h     fnmatch.h   fsg.h       ftw.h

Just what I'd expected


itsrm2% ls /u/i/fc<TAB>.h
Beeps

Why? I have single match /usr/include/fcntl.h.

2. _match

itsrm2% compconf completer=_complete:_match
itsrm2% ls /u/i/s*/f*.h<TAB>
Beeps

Why? Is it illegal to have two wildcards? Compare this with

itsrm2% ls /u/i/sys/f*.h<TAB>

that works nicely. What the difference?

3. Cursor positioning

itsrm2% ls /u/i/sys/f*.h<CURSOR HERE><TAB>
itsrm2% ls /usr/include/sys/fault.h<CURSOR HERE>
fault.h         fcntl.h         file.h          forcerr.h       fsid.h
fblk.h          fcp.h           filio.h         fp.h            fstyp.h
fbuf.h          fcpal_space.h   filsys.h        fppriocntl.h
fc.h            fd.h            fixpri.h        fpu.h
fc_debug.h      fddihdr.h       flock.h         fsiboot.h

Now press undo ...

itsrm2% ls /u/i/sys/f*<CURSOR HERE>.h

Well, I really expect "undo" to *undo* the things ... not to add anything else
...


/andrej



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