Skip to content
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

Make -- a valid command line option and follow the convention of it being the terminator for all options #867

Open
exoosh opened this issue Feb 20, 2024 · 0 comments
Labels
Component: CLI Command line flags, exit code handling, ... Priority: Medium Wrong or misleading documentation, broken behavior with workaround Size: Small Changes to a few localized lines of code (e.g. same function) Type: Enhancement

Comments

@exoosh
Copy link

exoosh commented Feb 20, 2024

Is your feature request related to a problem? Please describe.

This relates to #863. I encountered it when working around the issue of dotfiles not being shown by setting GLOBIGNORE=".:..", then invoking bats *.bats.

ShellCheck rightly pointed out that confusion could occur between command line options and files starting with -- when using a bare glob.

The convention in most GNU utils these days is to allow -- and assume that this terminates the list of options. Everything past that point is treated as a list of files/directories/items ...

Describe the solution you'd like

I would propose to allow for -- and have it signal the end of the list of options.

Describe alternatives you've considered

Currently I am simply using ./*.bats, which also dodges the issue.

@exoosh exoosh added Priority: NeedsTriage Issue has not been vetted yet Type: Enhancement labels Feb 20, 2024
@martin-schulze-vireso martin-schulze-vireso added Priority: Medium Wrong or misleading documentation, broken behavior with workaround Component: CLI Command line flags, exit code handling, ... Size: Small Changes to a few localized lines of code (e.g. same function) and removed Priority: NeedsTriage Issue has not been vetted yet labels Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: CLI Command line flags, exit code handling, ... Priority: Medium Wrong or misleading documentation, broken behavior with workaround Size: Small Changes to a few localized lines of code (e.g. same function) Type: Enhancement
Projects
None yet
Development

No branches or pull requests

2 participants