Re: [RFC] The design of new pathspec features

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [RFC] The design of new pathspec features

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:55:56

Duy Nguyen [off-list ref] writes:
Pathspec mnemonic
=================

Are :(literal) and :(glob) used often enough to deserve a short
mnemonic (like :/ is equivalent to :(top))? Which symbols should be
used?
I do not think we should discuss this before letting people gain
experience with various forms of magic; otherwise we would at best
end up with a concensus guess among uninformed.
New way to specify long pathspec magic
======================================

While testing the pathspec magic code, I grow tired of quoting :(glob)
every time because '(' is the start of a new shell. Which is one of
the reasons I introduce --[no]glob-pathspecs. Still I'd like a way to
specify long pathspec magic without quoting.
Is this a real issue, though?  Often interesting pathspecs do have
shell globs in them and we have to quote them anyway.
How about making ":q/xxx/" an equivalence of ":(xxx)"?
A moderately strong no from here.

Re: [RFC] The design of new pathspec features

From: Duy Nguyen <hidden>
Date: 2016-06-15 22:55:56

On Tue, Jan 29, 2013 at 12:05 PM, Junio C Hamano [off-list ref] wrote:
quoted
New way to specify long pathspec magic
======================================

While testing the pathspec magic code, I grow tired of quoting :(glob)
every time because '(' is the start of a new shell. Which is one of
the reasons I introduce --[no]glob-pathspecs. Still I'd like a way to
specify long pathspec magic without quoting.
Is this a real issue, though?  Often interesting pathspecs do have
shell globs in them and we have to quote them anyway.
:(icase) often won't (unless you combine with :(glob)). If we turn
grep's --max-depth feature into pathspec magic (feasible, just not
sure if it's actually useful), it won't need quoting either.

Even with :(glob), because of the complexity of the pathspec, it's
less likely to match anything and be expanded by bash, so no quoting
required.
quoted
How about making ":q/xxx/" an equivalence of ":(xxx)"?
A moderately strong no from here.
-- 
Duy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help