zsh-users
 help / color / mirror / code / Atom feed
From: Aleksandrina Nikolova <infinite.craziness@gmail.com>
To: Zsh Users <zsh-users@zsh.org>
Subject: Always display prefix, even if unambiguous?
Date: Sat, 27 Dec 2014 23:37:43 +0200	[thread overview]
Message-ID: <549F26A7.8020005@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2413 bytes --]

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"?

             reply	other threads:[~2014-12-27 22:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-27 21:37 Aleksandrina Nikolova [this message]
2014-12-29  3:55 ` Bart Schaefer
2014-12-29  8:56   ` Aleksandrina Nikolova

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=549F26A7.8020005@gmail.com \
    --to=infinite.craziness@gmail.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).