zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh workers <zsh-workers@sunsite.dk>
Subject: Re: Completion in pwd before subdirecories
Date: Mon, 15 Dec 2003 21:41:16 +0000	[thread overview]
Message-ID: <1031215214116.ZM13701@candle.brasslantern.com> (raw)
In-Reply-To: <6396.1071518828@gmcs3.local>

On Dec 15,  9:07pm, Oliver Kiddle wrote:
}
} Bart wrote:
} > 
} > So why aren't we using "_files -g '*.gz(.)'" in that case?
} 
} That's actually a much better plan.

I suppose really it should be "_files -g '*.gz(-.)'" ...

} We still need to ask whether the user should need a file-patterns style
} to achieve directories after files for the original menu completion
} question.

I presume this only applies in the case of also using the group-name and
group-order styles, because otherwise you don't get them separated in the
first place.

} Is globbed-files somewhere defaulting to `*'. Should it
} perhaps default to `*(.)'? I've not looked at _files but try ^Xh after
} something like `cat' or `:' with and without a file-patterns style.

It depends.

By default without a file-patterns style the only group is `*:all-files'.
So you have to have the file-patterns style to get any differentiation
at all.

tags in context :completion::complete:cat::
    all-files  (_files _default)

For commands that use "_files -g ..." the pattern passed in with -g is
used for globbed-files.

tags in context :completion::complete:gcc::
    argument-rest options  (_arguments _gcc)
tags in context :completion::complete:gcc:argument-rest:
    globbed-files  (_files _arguments _gcc) 
    directories    (_files _arguments _gcc) 
    all-files      (_files _arguments _gcc)

E.g. for "-g foo" it would be

    "foo:globbed-files *(-/):directories" "*:all-files"

Note that directories and globbed-files are completed together, which
normally means the extra directory would be suppressed as a duplicate.
It's only when wanting to split globbed-files and directories that you
see some directories twice, and that would be suppressed by using the
appropriate flags on the argument of -g.


  reply	other threads:[~2003-12-15 21:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20031213154651.GR18859@strindberg.dsv.su.se>
     [not found] ` <1031213191918.ZM5325@candle.brasslantern.com>
     [not found]   ` <20031213233905.GW18859@strindberg.dsv.su.se>
     [not found]     ` <3213.1071488991@gmcs3.local>
2003-12-15 17:02       ` Bart Schaefer
2003-12-15 17:09         ` Peter Stephenson
2003-12-15 19:13           ` Bart Schaefer
2003-12-15 18:56         ` Oliver Kiddle
2003-12-15 19:37           ` Bart Schaefer
2003-12-15 20:07             ` Oliver Kiddle
2003-12-15 21:41               ` Bart Schaefer [this message]
2003-12-16 11:23                 ` Oliver Kiddle
2003-12-17 15:57         ` Oliver Kiddle
2003-12-17 18:38           ` Bart Schaefer
2003-12-18  9:47             ` Oliver Kiddle

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=1031215214116.ZM13701@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@sunsite.dk \
    /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).