Multi-line / Block / Inline Comments
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 40.5k
- Forks
- 2.3k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 85
Description
Related problem
As far as I can tell, Nushell supports line comments which are started with a # but has no syntax for multi-line comments.
This has been discussed before in https://github.com/nushell/nushell/discussions/5734 and https://github.com/nushell/nushell/discussions/6470.
Describe the solution you'd like
I suggest adding support for inline and multi-line comments. I think the syntax used by Powershell is reasonable:
# This is a line comment
<#
This is a block comment
which consists of several lines
#>
$a = 10; <# This is an inline comment #> while ($a -ge 0) { echo $a; $a--; }
Describe alternatives you've considered
No response
Additional context and details
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the related discussions 5734 and 6470 alongside this issue to understand the unresolved syntax and semantics. Done would mean Nushell accepts the proposed PowerShell-style block and inline comment forms while retaining line comments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100