-
-
Notifications
You must be signed in to change notification settings - Fork 89
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
Concept quoting #703
Concept quoting #703
Conversation
ff1618c
to
72a09f5
Compare
8900bea
to
c521e1f
Compare
concepts/quoting/introduction.md
Outdated
|
||
~~~~exercism/advanced | ||
<details><summary> | ||
There are lots of details about bracket expressions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't heard these calls bracket expressions before. I usually call them a character set, though that might be taken from the regex world.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a term I got from Tcl. There doesn't seem to be a consensus, even among regex terminologies:
- Ruby: character classes -- this I actively want to avoid, since bash calls
[:alpha:]
a "character class" within a character set. - Python regex: a set of characters
- Python glob: I can't see it described in the glob or fnmatch modules.
- Perl: File::Glob calls it a character class
I'll change it to "character set". I did a bash mentoring session for acronym where the mentee used IFS=" ,-,_,*,?"
so describing it as a set of characters might help with that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Referenced from https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap09.html
The following character class expressions shall be supported in all locales:
[:alnum:] [:cntrl:] [:lower:] [:space:]
[:alpha:] [:digit:] [:print:] [:upper:]
[:blank:] [:graph:] [:punct:] [:xdigit:]
So perhaps "character class expression" to describe [:alpha:]
.
I see at least this line references them as "character_class".
Seems reasonable to me! Quoting is only needed to avoid word splitting and pattern expansions so they go hand in hand.
Unless I'm missing something, those two are saying the exact same thing. |
], | ||
"contributors": [ | ||
], | ||
"blurb": "Quoting in bash, and how it interacts with word splitting and filename expansion." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, the word splitting and filename expansion is in the blurb, so we must address these.
@kotp have I missed anything that is blocking your approval? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving (not sure it will count though) with comment.
1 The quick brown fox jumps. | ||
``` | ||
|
||
However, leaving variables unquoted is not recommended unless you also disable Filename Expansion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might mention "how to disable" here, or give a reference for further reading.
I'm using admonitions pretty liberally here, so we won't really see exactly how they get rendered until the PR is merged.