Skip to content

fish completion is broken in 8.4.1 #3502

Description

@sitiyou

Commit 19fd4d6 (#3126) broke fish completion.

Unquoted \n

-        set -l metadata (string split "," $completion);
+        set -l metadata (string split \n $completion);

Without quotes, \n is evaluated as a literal newline, which splits the command across lines in the generated script:

        set -l metadata (string split
 $completion);

Command substitution flattens newlines

Even if quoted, \n fails as a separator. The Python side outputs:

        return f"{item.type}\n{value}\n{help_escaped}"

But when captured via command substitution in Fish, the newlines are flattened:

    set -l response (env %(complete_var)s=fish_complete COMP_WORDS=(commandline -cp) \
COMP_CWORD=(commandline -t) %(prog_name)s);

To support multi-line, maybe we just need to escape \n in help message while keeping the old separator? Not 100% sure.

Either way, we should probably revert this change first to fix the broken completion

Activity

  1. added this to the 8.4.2 milestone on May 22, 2026
  2. kdeldycke commented on May 23, 2026

    @kdeldycke
    Collaborator

    This has been fixed by both #3504 and #3508

  3. locked as resolved and limited conversation to collaborators on Jul 24, 2026
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

    shell completion

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions