Skip to content

feat: replace > notation with blank-line grouping for code blocks#87

Closed
maxim-uvarov-ai-assistant wants to merge 21 commits into
nushell-prophet:mainfrom
maxim-uvarov-ai-assistant:only-new-notation
Closed

feat: replace > notation with blank-line grouping for code blocks#87
maxim-uvarov-ai-assistant wants to merge 21 commits into
nushell-prophet:mainfrom
maxim-uvarov-ai-assistant:only-new-notation

Conversation

@maxim-uvarov-ai-assistant
Copy link
Copy Markdown

Summary

  • Remove > REPL notation: Code blocks no longer require > prefix for line-by-line execution. Commands are now grouped by blank lines instead.
  • New inline output format: Output is displayed as # => comment lines after each command group, keeping code and output together.
  • Add separate-block fence option: For cases where a separate output-numd block is preferred over inline output.
  • Refactoring improvements: Simplify closures using $in, cleaner negation syntax in where clauses, remove obsolete --whole_block flag.

Breaking Changes

  • The > prefix is no longer recognized for REPL-style execution
  • Existing markdown files using > notation need to be updated to the new format

Test plan

  • Update all example markdown files to new format
  • Regenerate intermediate scripts
  • Verify numd run works on updated examples
  • Verify capture start/stop uses new format
  • Remove types_of_data example (had persistent formatting issues)

claude and others added 21 commits December 11, 2025 22:15
Updates testing commands to produce properly formatted JSON:
- Add --quiet flag to testing-unit to suppress nutest terminal output
- Pass --quiet from main testing when JSON output is requested
- Use 'to json --raw' instead of 'to json' for valid JSON serialization

This fixes JSON output format issues when running tests in CI/automated environments.
…sistant/docs/improve-command-descriptions"

This reverts commit 26a6504, reversing
changes made to 042721b.
Updated todo file to define clear implementation goals for removing the `>` notation from numd code block execution. The new approach will parse entire blocks, group commands by double newlines, and output results in `# =>` comment lines.
- Rewrite execute-block-lines to split by blank lines instead of > prefix
- Add split-by-blank-lines helper function
- Remove > stripping from remove-comments-plus
- Update clear-outputs to not preserve > lines
- Update capture start to use inline # => output format
- Add separate-block fence option for separate output blocks
- Change create-execution-code to use separate-block option
- Update code block parsing explanation (6-point list)
- Remove > notation from all code examples
- Update help output examples
- Remove reference to deleted types_of_data example
- Remove > notation from all example files
- Update to blank-line grouping format
- Regenerate # => output lines
- Update all _intermed.nu files with new execution format
- Update stripped markdown .nu files
This example had persistent formatting issues with the new
blank-line grouping format and is removed for now.
Update Example 2 to demonstrate the separate-block fence option
which outputs results in a separate code block instead of inline.
When a command produces no output (like variable assignments), the blank
line delimiter between command groups was being lost. This adds an
explicit `print ''` after each command group execution to ensure visual
separation is maintained in the output.
The --whole_block flag in create-execution-code was defined but never used in the function body. It became obsolete when the separate-block fence option was introduced. This commit removes the unused flag from:
- Function signature
- Example comment
- Function call in execute-block-lines

Also includes minor spacing beautification around closures.
…rt-options

- get-last-span: Remove redundant str trim -c "\n" before str trim
- check-print-append: Replace if/else returning booleans with single boolean expression
- convert-short-options: Extract result to explicit variable for clearer flow
Simplify regex negation from `where not ($it =~ ...)` to `where $it !~ ...` and improve formatting of boolean conditions in check-print-append for consistency with recent refactoring.
@maxim-uvarov-ai-assistant maxim-uvarov-ai-assistant deleted the only-new-notation branch December 13, 2025 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants