-
Notifications
You must be signed in to change notification settings - Fork 697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-evaluate UI design of recently added cabal list --exact
flag
#6683
Comments
I don't consider |
I would prefer the regex style. |
A problem with both glob and regex is how to denote case-(in)sensitivity. Currently the Extra flag to control which way it matches? |
I believe this is actually easier for the regex style: there's the idiom to say something like |
And interpret string which doesn't start with |
@hvr, @phadej, it's common idiom in greppers to use the So if the default behaviour of I would not recommend on a CLI interface to use the |
@szabi, |
Follow-up from #4267 as separate ticket as requested (so please excuse if this feels like it's missing context):
@v0d1ch Actually, I have an alternative design for this I've been wanting to implement for the longest time; listing exact matches is something I can already do via
cabal info
. What's the point of listing somethign where you already know the exact name for? :-)The most common search operations I want to perform are simple prefx/suffix matching:
^servant-
)-orphans$
)Now the primary bikeshedding thing is what syntax to support here; there's various possibilities; two obvious ones:
ls foo
andls foo-*
); substring matches would then be strings surrounded by*
, i.e.*foo*
.^foo$
to denote an exact match!I'm not sure which one's better; and it's more than enough to start by implementing only a basic subset which allows the common pre/suffix matches.
But this is something we should decide upon before we add an unnecessary flag like
--exact
which then might end up becoming a hard to remove again UI-wart because we didn't invest enough time to plan ahead what other kinds of patterns would make sense to match and come up with a more holistic UI design (and cabal unfortunately suffers from many tiny features stuck together because they seemed useful in isolation but weren't considered how they fit to the rest...)The text was updated successfully, but these errors were encountered: