Re: Add arrow key input support in dash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 06/08/2021 09:45, Evan Greenup wrote:
Although dash is lite and simplified edition of bash, It doesn't support arrow key to move the cursor position.

In order to improve performance, a lot of feature in bash are removed in dash.

Add arrow key support will not cost too much performance.

Currently it dash is like that:

```sh
$ echo hello
hello
$ echo ^[[D^[[D^[[D^[[D^[[C^[[C^[[C^[[C^[[A^[[A^[[A^[[A^[[A^[[B^[[B^[[B^[[B^[[B

$ ^[[D^[[A^[[C^[[B^[[D^[[A^[[C^[[B^[[D^[[A^[[C^[[B

```

The cursor won't move but only append unexpected character.

This is configurable. When dash is built with libedit support (configure --with-libedit), and the emacs or vi option is enabled, libedit is used for entering commands which will handle this (and more).

Cheers,
Harald van Dijk



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux