LibTerm icon indicating copy to clipboard operation
LibTerm copied to clipboard

Editing command line can hang shell

Open treyharris opened this issue 5 years ago • 1 comments

Just two keystrokes can cause the shell to become unusable.

Steps to reproduce

  1. Open a LibTerm shell.
  2. Type ls or another command, but do not execute it.
  3. Press ⌃a to jump to the beginning of the line.
  4. Press ⌃k to kill the remaining text on the line.

Expected result

The cursor moving to the l in ls and then ls deleted, allowing a new command to be typed.

Actual result

The cursor jumps to column 0 (at the beginning of the shell prompt) after ⌃a: The cursor at the leftmost column of a line reading Trey Harris’s iPad Pro $ ls

and then after typing ⌃k to kill the remaining text on the line, the shell prompt is deleted:

The prompt Trey Harris’s iPad Pro $ disappears At this point, typing ls ⏎ has no effect. ⌃c, ⌃d or ⌃z also have no effect. It appears the shell is totally hung.

Discussion

This issue bears superficial similarity to #27 but is different:

  • At least with version LibTerm version 5.1.4 (2), Nov 11, 2019 at 08:30, I do not have the issue described. For instance, if I type Prompt reading Trey Harris’s iPad Pro $ echo this could be a long line I can hit as many times as necessary to get to this point: Same as before, but with cursor on the l in long and then can type very␣ to get: Same as before, but with very  inserted and now, if I press , I get: The output, this could be a very long line, followed by another awaiting prompt. — note that the output includes long line, so pressing mid-line did not truncate the remainder.
  • This issue has to do with being able to edit the prompt text, not the command-line after the prompt.

treyharris avatar Feb 14 '20 18:02 treyharris

How are you even able to type a control character? There are no ctrl, tab, nor ARROW keys anywhere to be found on any of the virtual keyboards. This is the most critically missing feature I have seen so far. 😝

captain avatar Apr 24 '24 23:04 captain