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

Re: more wishes with automounter



On Sep 13, 11:32am, Alexandre Duret-Lutz wrote:
} Subject: Re: more wishes with automounter
}
}     zstyle -e ':completion:*' file-patterns \
}       '[[ $PREFIX == /nfs/[^/]# ]] && \
}         { setopt noglob ; reply=(*(@,/)) ; setopt glob }'
} 
} Leads to:
} 
} ~ % ls /nfs/<TAB>
} _path_files:327: bad pattern: /nfs/*(@

This is because _files splits the file-patterns at commas on line 58.  I'm
not sure why, or how to fix it.  It might be to replace

    pat="${${${sdef%%:${tag}*}//\\:/:}//,/ }"

with

    pat="${${${sdef%%:${tag//,/ }*}//\\:/:}}"

but I fear that only Sven knows for sure.  In any case, a qualifier with
a comma in it would interact badly with the file-sort tag, because it will
be rewritten as e.g. *(@,/Om), which is not what you meant.

The workaround is to use reply=(*(@) *(/)) in your style instead.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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