Skip to content
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.

Bash-like Globbing #49

Closed
execjosh opened this issue Jul 23, 2016 · 6 comments
Closed

Bash-like Globbing #49

execjosh opened this issue Jul 23, 2016 · 6 comments
Assignees
Milestone

Comments

@execjosh
Copy link
Owner

execjosh commented Jul 23, 2016

QUESTIONS for the COMMUNITY

What say ye?

  • Is RegExp overkill?
  • Would bash-like globbing be a better way to configure your file types?
  • How could we transition from the current way of configuring?

"I'm verklempt. Speak amongst yourselves."


My thoughts:

  • Bash-like globbing is simple
  • It is easy and familiar to specify and understand
  • A breaking change is probably fine as long as most people know about it ahead of time
    • Need some kind of notification inside the package, probably
@execjosh
Copy link
Owner Author

Well, I started an implementation...

@execjosh execjosh self-assigned this Jul 24, 2016
@execjosh execjosh changed the title Bash Globbing Bash-like Globbing Jul 24, 2016
@execjosh
Copy link
Owner Author

execjosh commented Aug 6, 2016

Sooo... No thoughts from the community...?

@execjosh
Copy link
Owner Author

I suppose, then, it'll be best to make an interim, deprecated-but-still-useable-as-is term to ease transition. I will update this pr.

@mishak87
Copy link

I would just show how to migrate rules notification if user has already some rules defined. Maybe tag next as 1.0 so it is clear it is a firm decision to go with bash glob instead of regex. Just my 2️⃣ cents.

Thanks!

@execjosh
Copy link
Owner Author

execjosh commented Aug 12, 2016

Thank you very much for your 2¢! The more the merrier :)

I have, actually, been toying with the idea of showing a notification, because I don't want to just break everyone's settings all of a sudden—that's not very nice ;)

And I do agree that cutting 1.0 as soon as possible is a good idea :)

I'm thinking of first deploying a pre-release version able to handle both formats (assuming globbing but defaulting to current behaviour) that would display a notification (and maybe even stating a planned deadline). Then, after some interval, the actual 1.0 that would completely remove the notification and interpret everything as glob could be released.

However, Extension Matchers, being a subset of globs (i.e., no wildcards), are difficult to discern from regular globs. RegExp Matchers could be valid globs but have a different meaning. So, there's a little dilemma as to deciding whether the user has updated to globs or not. I suppose moving the settings to a separate key (see #28) in the config could mitigate that; but, is another key even worth it? I dunno... I'm probably over analyzing...

Thanks again for your thoughts. I had hoped to have a larger discussion. Please feel free to give more thoughts ;)

@mishak87
Copy link

mishak87 commented Aug 13, 2016

I think there should be only glob as official matching in 1.0 that way it is simple and not confusing. Extensions are just shortcut for *<ext> (feature just for one extra character).
No key for rules (rules mixed with settings) was bit confusing for me at the start. Maybe putting all globs into rules key and supporting rest silently as is might be an option.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants