Skip to content

Comments

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

Merged
Aetf merged 2 commits intoAetf:developfrom
viccie30:split_command_string
Aug 5, 2022
Merged

Allow quoting to preserve spaces in the login option in config file#59
Aetf merged 2 commits intoAetf:developfrom
viccie30:split_command_string

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

viccie30 added 2 commits July 25, 2022 13:30
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 force-pushed the split_command_string branch from 76cd02a to 51e41dd Compare July 25, 2022 11:36
@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