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

Allow quoting to preserve spaces in the login option in config file #59

Merged
merged 2 commits into from
Aug 5, 2022

Conversation

viccie30
Copy link

There are three ways to quote supported, derived from shell quoting.

  • Without surrounding quotes, backspace unconditionally escapes the
    following character. \ is parsed as a single space which does not
    separate words.
  • Within double quotes, backspace only escapes backspace and double
    quotes. "\\" is parsed as a single backslash, while "\b" is parsed
    as the two characters backslash and 'b'. All white space is preserved
    within quotes.
  • Within single quotes, backspace does not work as an escape character.
    '\"' is parsed as the two characters backslash and dobule quote.
    All white space is preserved within quotes.

Fixes #57

tests/test_common.h Outdated Show resolved Hide resolved
This allows running unit tests on newly added/changed/fixed code in
libshl.

Remove the older tests from meson's test framework, because they require
human interaction. They are still built.
There are three ways to quote supported, derived from shell quoting.

- Without surrounding quotes, backspace unconditionally escapes the
  following character. `\ ` is parsed as a single space which does not
  separate words.
- Within double quotes, backspace only escapes backspace and double
  quotes. `"\\"` is parsed as a single backslash, while `"\b"` is parsed
  as the two characters backslash and 'b'. All white space is preserved
  within quotes.
- Within single quotes, backspace does not work as an escape character.
  `'\"'` is parsed as the two characters backslash and dobule quote.
  All white space is preserved within quotes.

Fixes Aetf#57
@viccie30 viccie30 marked this pull request as ready for review July 25, 2022 11:38
Copy link
Owner

@Aetf Aetf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!! LGTM. The next step would be to setup CI to run on every commit but that's a separate issue.

@Aetf Aetf merged commit 20a2fc4 into Aetf:develop Aug 5, 2022
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.

Allow quoting to preserve spaces in the login option in config file
2 participants