thoughtbot / thoughtbot/dotfiles

Option-Arrow on a command prompt prevents text from being edited/deleted

Open
#737 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
8.2k
Forks
1.8k
Avg merge
10d 14h
Merged PRs (30d)
1

Description

Hello!

I'm running the latest version and I'm not sure what is going on. I tend to have a pattern where I'll up-arrow through my history to find a command, and then need to modify it slightly. So let's say I have the following command:

cp ~/mydirectory/home ~/mydirectory/home_backup

And I've forgotten the -r. So my workflow is I'll hit up-arrow to bring the command up again, and then I use option-left-arrow to move by word to just before the cp command. But when I type it doesn't always insert characters, and I find that also once I type I can't seem to delete before where I started typing. So using the above example, if I option-left-arrow to the first tilde, and then try to type, I can't ever delete (or even get to!) anything earlier in the line than that.

I'm sure this is a behavior I don't understand, but is there any way to turn that off? Or to help me understand what it's doing? (It doesn't seem to be a Vim mode, but maybe it's an Emacs mode and I don't use that?)

Thanks!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the reported command-prompt behavior by recalling a command with up-arrow, moving with Option-Left-Arrow, and trying to insert and delete text. Inspect the repository's zsh and command-prompt configuration to identify the behavior, then confirm that the relevant setting is explained or corrected.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell, zsh
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.