Skip to content

__fish_complete_path: preserve equals signs in prefixes - #12908

Open
SR0725 wants to merge 1 commit into
fish-shell:masterfrom
SR0725:fix/complete-path-option-prefix
Open

__fish_complete_path: preserve equals signs in prefixes#12908
SR0725 wants to merge 1 commit into
fish-shell:masterfrom
SR0725:fix/complete-path-option-prefix

Conversation

@SR0725

@SR0725 SR0725 commented Aug 1, 2026

Copy link
Copy Markdown

Description

__fish_complete_path --bar= currently treats the equals sign as an option or assignment delimiter, then offers unrelated files with --bar= prepended. This escapes the equals sign only in the synthetic command line passed to complete, keeping it part of the path prefix. A real match such as --bar=baz still completes normally.

Fixes #12885.

Testing

  • python3 tests/test_driver.py target/debug tests/checks/complete_path.fish
  • target/debug/fish_indent --check share/functions/__fish_complete_path.fish tests/checks/complete_path.fish
  • TERM=xterm-256color cargo xtask check passed formatting, Clippy, unit tests, doc tests, docs, and 204 of 207 integration checks. The remaining checks were blocked by local Sphinx deprecation warnings and a tmux process-group permission error; none exercise these files.

TODOs

  • If addressing an issue, a commit message mentions Fixes issue #<issue-number>
  • Changes to fish usage are reflected in user documentation/manpages. No user documentation changes are needed for this private completion helper.
  • Tests have been added for regressions fixed
  • User-visible changes noted in CHANGELOG.rst. Skipped for this completion-only change.

Escape equals signs before passing the target to the completion engine so they remain part of the path prefix.

Fixes fish-shell#12885
@krobelus krobelus added this to the fish 4.9 milestone Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

__fish_complete_path filtering ignores prefixes like --anything=

2 participants