mirror of
https://github.com/nushell/nushell.git
synced 2026-11-23 01:48:49 +08:00
## Description
This PR fixes a bug where `"#00abcd"` couldn't be passed as a parameter
because `#` indicates to nushell that a comment is following.
## User-facing changes (Release notes)
Quotes strings with `"#"` in them like `"#00abcd"` are now allowed to be
passed as parameters.
### Example
A script named test.nu
```nushell
def main [color: string] {
$"Your color is ($color)"
}
```
Then pass a hex color as a parameter.
```nushell
❯ let myColor = "#000000"
❯ nu test.nu $myColor
Your color is #000000
❯ nu test.nu "#abcdef"
Your color is #abcdef
```
## Additional notes
closes https://github.com/nushell/nushell/issues/18778