Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Completion in pwd before subdirecories
- X-seq: zsh-workers 19294
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxxxxx>
- Subject: Re: Completion in pwd before subdirecories
- Date: Mon, 15 Dec 2003 21:41:16 +0000
- In-reply-to: <6396.1071518828@xxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20031213154651.GR18859@xxxxxxxxxxxxxxxxxxxx> <1031213191918.ZM5325@xxxxxxxxxxxxxxxxxxxxxxx> <20031213233905.GW18859@xxxxxxxxxxxxxxxxxxxx> <3213.1071488991@xxxxxxxxxxx> <1031215170258.ZM12804@xxxxxxxxxxxxxxxxxxxxxxx> <5719.1071514564@xxxxxxxxxxx> <1031215193717.ZM13527@xxxxxxxxxxxxxxxxxxxxxxx> <6396.1071518828@xxxxxxxxxxx>
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author