Merged
Conversation
`read -rp` without `-e` reads raw bytes, so backspace sends a literal DEL/BS character into the buffer instead of erasing the previous character. Arrow keys and other editing keys have the same problem. Adding `-e` enables readline line-editing for both prompt helpers: - `prompt_with_default` in install.sh - `prompt_confirm` in lib/wt-common Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Extends the `read -rp` → `read -erp` fix to all interactive prompts that were added/refactored in main but missed in the original fix: - lib/wt-context-setup: 10 prompts (repo path, context name, config fields, freeform input, numeric selection) - lib/wt-choose: worktree selection prompt - lib/wt-context: context selection prompt Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
guodong-sq
approved these changes
Feb 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Interactive prompts in the installer and supporting libraries used
read -rpwithout the-eflag. The terminal's line discipline (cooked mode) handles basic editing like backspace, butreadwithout-edoes not engage readline — so these features don't work:repo roots, worktree directories, symlink paths, etc.
recall history
(jump to start/end), etc.
This is especially noticeable for the path prompts in the setup flow, where Tab completion is the natural way to navigate deep directory trees.
Fix
Add
-eto all interactiveread -pcalls.-ehands input to readline, enabling full line-editing and completion support.#!/usr/bin/env bashis used throughout, so the bash-specific-eflag is always available.
Files changed:
lib/wt-common—prompt_confirmlib/wt-context-setup— 10 prompts (repo path, context name, config fields, free-form input, numeric selection)lib/wt-choose— worktree selection promptlib/wt-context— context selection prompt