Commit 19fd4d6 (#3126) broke fish completion. ## Unquoted `\n` ```diff - 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: ```python return f"{item.type}\n{value}\n{help_escaped}" ``` But when captured via command substitution in Fish, the newlines are flattened: ```fish 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
Fix broken fish completion and multiline help string
kdeldycke commentedon May 23, 2026
This has been fixed by both #3504 and #3508
Fix broken fish completion and multiline help string