Files
nushell/tests/shell
Darren Schroeder 15268e32db allow parameters with # to be passed (#18782)
## 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
2026-08-07 07:02:03 -05:00
..