Files
Altay 5b02bb130f fix(completion): complete bash words that contain a colon (#15368)
Bash splits COMP_WORDS at every COMP_WORDBREAKS character, so
`pnpm run test:u` reaches the completion function as `test`, `:`, `u`,
and readline replaces only the text after the last colon.

pnpm v12 passed the split words to the completion server unless
bash-completion's `_get_comp_words_by_ref` was loaded, so the server saw
`test` as the script argument and returned nothing. The bash script now
rejoins adjacent words from COMP_LINE itself.

pnpm v11 reads the command line from COMP_LINE and returned `test:unit`,
but bash inserted it after `test:` and produced `test:test:unit` unless
bash-completion's compatibility helpers were loaded. Both scripts now strip
the part of the current word up to its last word break from each candidate,
without depending on bash-completion.

Closes pnpm/pnpm#5482.
2026-09-23 21:41:55 +02:00
..