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

Always display prefix, even if unambiguous?



Greetings! I don't know if this counts as a bug or I've overlooked something, but I can't figure out how to make zsh's compsys to always display the full path when completing filenames, for example:

ls /usr/s/l<TAB> generates:
*files:**
**sbin/ldattach* sbin/lpadmin* sbin/lshw* share/libbluray/ share/liblangtag/ share/llvm/ src/linux@ ** **sbin/locale-gen* sbin/lpc* sbin/lspci* share/libexttextcat/ share/libquvi-scripts/ share/locale/ src/linux-3.17.7-gentoo/** **sbin/logoutd* sbin/lpinfo* share/lcdf-typetools/ share/libidn/ share/librarian/ share/log4j/ ** **sbin/logrotate* sbin/lpmove* share/lftp/ share/libjpeg-turbo/ share/libtool/ share/lshw/ *

which is fine. If I add the file-pattern style:
zstyle ':completion:*' file-patterns '*(-^/):files:file *(-/):directories:directory' to separate files from dirs, I get:
*file:**
**ldattach* locale-gen* logoutd* logrotate* lpadmin* lpc* lpinfo* lpmove* lshw* lspci* **
**
**directory:**
**share/lcdf-typetools/ share/libexttextcat/ share/liblangtag/ share/libtool/ share/log4j/ src/linux-3.17.7-gentoo/ ** **share/lftp/ share/libidn/ share/libquvi-scripts/ share/llvm/ share/lshw/ ** **share/libbluray/ share/libjpeg-turbo/ share/librarian/ share/locale/ src/linux@ *

i.e. it does not list the directory of the files, because they are all in sbin and zsh seems to treat the dirs and files completion separately now. If I complete something like
ls /etc//a<TAB> I get:*
**file:**
**acpi/ati-powermode.sh* ati/amdpcsdb.default conf.d/acpid conf.d/atieventsd init.d/atd* mail/aliases.db pam.d/atd ** **at/at.deny ati/authatieventsd.sh* conf.d/alsasound init.d/acpid* init.d/atieventsd* modprobe.d/aliases.conf security/access.conf ** **ati/amdpcsdb at-spi2/accessibility.conf conf.d/atd init.d/alsasound* mail/aliases modprobe.d/alsa.conf **
**
**directory:**
**acpi/actions/ lvm/archive/ ssl/apache2/ terminfo/a/ xdg/autostart/*

the full path (relative to the unambiguous prefix /etc) is listed for both files and dirs, since the paths are ambiguous in both cases.

I hope I made myself clear. How can I "fix this"?


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