Skip to content

F1 help viewer displays literal carriage returns (^M) in help output on Windows (0.117.0) #19617

Closed

Description

@hoefgen-julian-auticon

Bug report form

  • I have done a basic search of the issue tracker to find any existing issues that are similar.
  • I have checked that my version is at least the latest stable release available via my installation method.

Describe the bug

On Windows, the built-in help viewer (invoked via F1) shows help text polluted with literal carriage returns: many lines end with a visible ^M (CR) character, producing garbled output. This affects apparently all commands (observed with cd and if). help cd / help if in the regular shell render the same help text correctly, so the problem appears to be in the help viewer's rendering, not in the help text itself. Worked correctly in 0.116.1.

How to reproduce

  1. Open Nushell 0.117.0 on Windows
  2. Press F1 to open the help viewer
  3. Look up any command, e.g. cd or if
  4. Observe the displayed help text: many lines end with a literal ^M

Actual output (help for cd in the F1 viewer):

Change the current working directory.^M
^M
Usage:^M
  > cd {flags} (path) ^M

Flags:
  -h, --help: Display the help message for this command
  -P, --physical: Use the physical directory structure; resolve symbolic links before processing instances of ..
^M
Parameters:^M
  path: The path to change to. (optional)^M

Actual output (help for if in the F1 viewer):

Conditionally run a block.^M
^M
This command is a parser keyword. For details, check:
  https://www.nushell.sh/book/thinking_in_nu.html^M
^M
Usage:^M
  > if <cond> <then_block> (else <else_expression>) ^M

Flags:
  -h, --help: Display the help message for this command
^M
Parameters:^M
  cond: Condition to check.^M
  then_block: Block to run if check succeeds.^M
  else_expression: Expression or block to run when the condition is false. (optional)^M

Examples:
  if 2 < 3 { 'yes!' }
  if 5 < 3 { 'yes!' } else { 'no!' }
  if 5 < 3 { 'yes!' } else if 4 < 5 { 'no!' } else { 'okay!' }

Note the pattern in both outputs: some lines carry the stray ^M while others (Flags, Examples) do not. For comparison, help cd / help if in the same session display the same text correctly (without ^M).

Expected behavior

The F1 help viewer renders help text cleanly without visible CR/carriage-return characters, as in 0.116.1.

Configuration

key value
version 0.117.0
major 0
minor 117
patch 0
branch
commit_hash a481925
build_os windows-x86_64
build_target x86_64-pc-windows-msvc
rust_version rustc 1.97.1 (8bab26f4f 2026-07-14)
rust_channel 1.97.1-x86_64-pc-windows-msvc
cargo_version cargo 1.97.1 (c980f4866 2026-06-30)
build_time 2026-11-09 21:23:33 +00:00
build_rust_channel release
allocator standard
features dap, default, lsp, mcp, network, plugin, rustls-tls, sqlite, trash-support
installed_plugins formats 0.117.0, gstat 0.117.0, inc 0.117.0, query 0.117.0
experimental_options example=false, dc-glob=false, reorder-cell-paths=true, pipefail=true, enforce-runtime-annotations=true, native-clip=false, cell-path-types=false
  • Terminal: Windows Terminal (also reproduced in legacy conhost)

Activity

  1. added
    status:needs-triage
    on Nov 20, 2026
  2. kronberger-droid commented on Nov 20, 2026

    @kronberger-droid
    Contributor

    Did you test this on the latest main? I think I fixed the lexer issues recently in #19504.

  3. hoefgen-julian-auticon commented on Nov 20, 2026

    @hoefgen-julian-auticon
    Author

    I built the main branch (commit a6416eb, version 0.117.1) and tested it.

    But the issue is still there.

  4. added a commit that references this issue on Nov 23, 2026
    976d894
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:needs-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions