Skip to content

Expand on quote parsing, add aliases, add case insensitive args#137

Open
libraryaddict wants to merge 1 commit into
loathers:mainfrom
libraryaddict:patch-1
Open

Expand on quote parsing, add aliases, add case insensitive args#137
libraryaddict wants to merge 1 commit into
loathers:mainfrom
libraryaddict:patch-1

Conversation

@libraryaddict

Copy link
Copy Markdown
  • Allows arguments to be case insensitive (eg, "shouldFlyMonkey" is no longer so case strict)
  • Allows negation to also be - instead of just !
  • Quoted arguments are a bit smarter, with only strings that start with a quote character being treated as a quote, and a quote will consume everything until it reaches an unescaped quote that must end at the end of the life, or with a space after
  • Adds aliases for a key, with an error message to match it

With a string parameter if you pass in arg="notquoted" then it would output the backslashes as well, which could be unwanted? But the simple solution there is to "\"notquoted\"" or ""notquoted"" which are effectively the same thing.

The proper solution would be to make it stricter, but then you run into the user error issue.

* Allows arguments to be case insensitive (eg, "shouldFlyMonkey" is no longer so case strict)
* Allows negation to also be `-` instead of just `!`
* Quoted arguments are a bit smarter, with only strings that start with a quote character being treated as a quote, and a quote will consume everything until it reaches an unescaped quote that must end at the end of the life, or with a space after
* Adds aliases for a key, with an error message to match it

With a string parameter if you pass in arg=\"notquoted\" then it would output the backslashes as well, which could be unwanted? But the simple solution there is to `"\"notquoted\""` or `""notquoted""` which are effectively the same thing.

The proper solution would be to make it stricter, but then you run into the user error issue.
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

Successfully merging this pull request may close these issues.

1 participant