nushell / nushell/nushell

Multi-line / Block / Inline Comments

Open
#10,096 18 comments 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A:help-system A:syntax category:documentation category:enhancement status:needs-design
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.