Skip to content

fix(prompt): stop dash-led directories from breaking pwd truncation - #98

Merged
plttn merged 1 commit into
mainfrom
push-qpmvozlsxoox
Jul 28, 2026
Merged

fix(prompt): stop dash-led directories from breaking pwd truncation#98
plttn merged 1 commit into
mainfrom
push-qpmvozlsxoox

Conversation

@plttn

@plttn plttn commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • _tide_pwd's truncation branch passed directory names to string match, string escape, and string join without --. A name starting with a dash was read as an option, breaking the prompt.
  • Same bug as upstream IlanCosman/tide#668. Here it surfaces as a test: Missing argument error rather than a hang, since this fork hands prompts off through a tempfile instead of a shared universal variable.
  • Adds -- before each path-derived value in the truncation branch.

Test plan

  • mise run test (full suite, including two new regression cases: a long dash-led directory, and a same-prefix sibling that forces the disambiguation loop past the dash)
  • mise run fmt / mise run lint

_tide_pwd's truncation branch passed directory names to string match,
string escape, and string join without --. A name starting with a
dash was then read as an option, breaking the prompt. Same bug as
upstream IlanCosman/tide#668; here it shows as a "test: Missing
argument" error instead of a hang, since prompts are handed off
through a tempfile rather than a shared universal variable.

Add -- before each path-derived value, and add regression tests for
the plain error case and the hang case (a same-prefix sibling that
forces the truncation loop to grow past the dash).
@plttn
plttn merged commit 8be1dbb into main Jul 28, 2026
7 checks passed
@plttn
plttn deleted the push-qpmvozlsxoox branch July 28, 2026 17:51
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.

1 participant