-
Notifications
You must be signed in to change notification settings - Fork 14
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
Support multiple files from the CLI (support dir globs) #109
Comments
schneems
changed the title
Support terminal globs
Support multiple files from the CLI (support dir globs)
Nov 7, 2021
schneems
added a commit
that referenced
this issue
Nov 9, 2021
Close #109 This change allows multiple files to be passed into the CLI with one call: ``` $ ./exe/dead_end **/*.rb Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK ```
schneems
added a commit
that referenced
this issue
Nov 9, 2021
Close #109 This change allows multiple files to be passed into the CLI with one call: ``` $ ./exe/dead_end **/*.rb Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK ```
schneems
added a commit
that referenced
this issue
Nov 9, 2021
Close #109 This change allows multiple files to be passed into the CLI with one call: ``` $ ./exe/dead_end **/*.rb Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK Syntax OK ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem
To run this against multiple files developers want to run:
This doesn't work today due to terminal globbing, which we don't yet support. What's happening when that command is run is that info isn't coming to dead_end. Your shell is expanding the input to be all files:
So what's really happening when you run that
dead_end **/*.rb
command (I think) is that we're only looking at the first file in the list. i.e. calling this:Is functionally the same as calling:
That's the problem.
Solution
The fix would be pretty easy, which would be to look at all inputs rather than just the first one. Essentially change this in the CLI to loop over all args, https://github.com/zombocom/dead_end/blob/e8eb54c651bfa196fc933f76def5d811bb5d57dc/lib/dead_end/cli.rb#L43-L55
The text was updated successfully, but these errors were encountered: