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

Feature request: provide a way to skip option parsing #778

Closed
nfischer opened this issue Oct 6, 2017 · 0 comments
Closed

Feature request: provide a way to skip option parsing #778

nfischer opened this issue Oct 6, 2017 · 0 comments
Assignees
Milestone

Comments

@nfischer
Copy link
Member

nfischer commented Oct 6, 2017

Commands like grep() provide option parsing, which is awesome. But it would be great if I could tell shelljs when to not do option parsing.

In the shell, sometimes I want to actually grep for -v in a file, instead of using it as an option.

In the shell:

$ grep -- -v file.txt

Proposed shelljs feature:

shell.grep('--', '-v', 'file.txt');
@nfischer nfischer self-assigned this Oct 6, 2017
nfischer added a commit that referenced this issue Oct 20, 2017
This adds the special option string `--`, which means "no options". This can be
passed if the first parameter looks like an option (starts with a `-` followed
by 1+ letters).

Fixes #778
@nfischer nfischer added this to the v0.8.0 milestone Oct 20, 2017
nfischer added a commit that referenced this issue Oct 27, 2017
This adds the special option string `--`, which means "no options". This can be
passed if the first parameter looks like an option (starts with a `-` followed
by 1+ letters).

Fixes #778
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant