* Add arrow key input support in dash
@ 2021-08-06 8:45 Evan Greenup
2021-08-06 8:58 ` Harald van Dijk
0 siblings, 1 reply; 2+ messages in thread
From: Evan Greenup @ 2021-08-06 8:45 UTC (permalink / raw)
To: dash
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Add arrow key input support in dash
2021-08-06 8:45 Add arrow key input support in dash Evan Greenup
@ 2021-08-06 8:58 ` Harald van Dijk
0 siblings, 0 replies; 2+ messages in thread
From: Harald van Dijk @ 2021-08-06 8:58 UTC (permalink / raw)
To: Evan Greenup, dash
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-06 8:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-06 8:45 Add arrow key input support in dash Evan Greenup
2021-08-06 8:58 ` Harald van Dijk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).