Skip to content

Nushell shows extra ^M in tab-completion decsriptions when scripts using CRLF line endings #19499

Closed

Description

@Elkeid-me

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

When a script uses Windows-style CRLF (\r\n) line endings, sourcing it causes auto-completion to display extraneous ^M characters.

How to reproduce

  1. Create a script named example.nu with the following content:
    # Example
    def example [] {}
  2. Save the file using CRLF line endings.
  3. In Nushell, run:
    source example.nu
  4. Type ex and press Tab to trigger auto-completion.
  5. an extra ^M
    image

Expected behavior

The completion should show example's description cleanly, without any ^M.

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
experimental_options example=false, dc-glob=false, reorder-cell-paths=true, pipefail=true, enforce-runtime-annotations=true, native-clip=false, cell-path-types=false

Activity

  1. added
    status:needs-triage
    on Nov 11, 2026
  2. fdncred commented on Nov 11, 2026

    @fdncred
    Contributor

    @kronberger-droid any thoughts here?

  3. kronberger-droid commented on Nov 11, 2026

    @kronberger-droid
    Contributor

    @fdncred I added some escaping for safety purposes in reedline. Probably thats from these. I will come back to you.

  4. kronberger-droid commented on Nov 11, 2026

    @kronberger-droid
    Contributor

    Found the bug. its a bug in nushell that my changes in reedline just surfaced. PR will be up soon.

  5. changed the title [-]Nushell shows extra `^M` in Tab completion decsription when scripts using CRLF line endings[/-] [+]Nushell shows extra `^M` in tab-completion decsriptions when scripts using CRLF line endings[/+] on Nov 11, 2026
  6. kronberger-droid commented on Nov 11, 2026

    @kronberger-droid
    Contributor

    @Elkeid-me Can you check out if my PR #19504 fixes it for you?

  7. Elkeid-me commented on Nov 12, 2026

    @Elkeid-me
    Author

    @kronberger-droid Yes, I can confirm that your PR fixes the issue. Thanks for the fix!

  8. added a commit that references this issue on Nov 13, 2026
    a93aaef
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