Describe the bug
Nufmt adds a newline after comments, potentially breaking pipelines.
Script or statement
$env.config = $env.config
# | upsert edit_mode vi
| upsert show_banner false
Actual behavior/output
$env.config = $env.config
# | upsert edit_mode vi
| upsert show_banner false
The newline added after the comment breaks the pipeline:
Error: nu::parser::input_type_mismatch
× Command does not support nothing input.
╭─[/home/pheenty/a.nu:4:3]
3 │
4 │ | upsert show_banner false
· ───┬──
· ╰── command doesn't support nothing input
╰────
Expected behavior/output
$env.config = $env.config
# | upsert edit_mode vi
| upsert show_banner false
(nothing should change)
Environment
❯ $nu.os-info
╭────────────────┬───────────────╮
│ name │ linux │
│ arch │ x86_64 │
│ family │ unix │
│ kernel_version │ 7.1.8-arch1-3 │
╰────────────────┴───────────────╯
❯ nufmt --version
nufmt 0.1.4
Describe the bug
Nufmt adds a newline after comments, potentially breaking pipelines.
Script or statement
Actual behavior/output
The newline added after the comment breaks the pipeline:
Expected behavior/output
(nothing should change)
Environment