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

Re: "dpkg-reconfigure" dash no longer works



Darac Marjal writes:


On 10/06/2023 16:08, S M wrote:
On Sat, Jun 10, 2023 at 02:12:14PM +0100, Darac Marjal wrote:

Is command-line editing part of POSIX, then? Are you suggesting that dash is
missing some bit of POSIX compliance? That's possible.
Command-line editing in vi-mode is defined by POSIX, but it's not mandatory as
far as I know.

OK, this looks like Bug #561663. If I read that bug correctly, the intention IS that dash should support command-line editing (in your case, you'd invoke it with -V for vi-style editing. The maintainer claimed the block was closed, but then they re-opened it two days later.

Interesting. I am also one of the niche users interested in running dash as a primary shell with vi-style line editing.

Last time I tried it (must be several years ago already), the vi-style editing did indeed work when enabled with `set -o vi`. On my current Debian oldstable (bullseye) workstation it does not work anymore.

Back when the vi-style editing worked it was _almost_ ready for "productive" use. Unfortunately, POSIX shells do not support bash's `\[` and `\]` in prompts that can be used to hide color code sequences from being counted towards the prompt length. This caused there to be a discrepancy between the observed and computed lengths leading to erratic line editing whenever the line exteeded the width of the window (happens often for me).

Hence I concluded that while it sounds nice to switch to `sh` as the primary shell in theory, this does not quite work in practice (for me anyways).

YMMV
Linux-Fan

öö

Attachment: pgp0n474ZUqhL.pgp
Description: PGP signature


Reply to: