[Top][All Lists]

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

Re: Echoing commands in vi visual mode

From: Chet Ramey
Subject: Re: Echoing commands in vi visual mode
Date: Mon, 30 Jun 2014 11:55:04 -0700
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

On 6/26/14, 4:56 AM, Ondrej Oprala wrote:
> On 06/11/2014 07:26 PM, Chet Ramey wrote:
>> On 6/11/14, 6:35 AM, Ondrej Oprala wrote:
>>> Hi,
>>> bash-4.3 seems to act differently(better) in vi visual mode, than previous
>>> bash-4 minors.
>>> However, ksh gave a different result all along.
>> This isn't standardized, so I'm not worried about small differences between
>> implementations in something that happens interactively.
> True, it's an unimportant detail, though ksh-compliance seems to
> always be desired.

Not really.  There's no reason to be deliberately incompatible with other
shells where non-interactive features are concerned, but ksh is not
something to be `compliant' with.

> Anyway, one of my colleagues wrote a small patch that brings
> the behaviour very close to ksh. Could you please comment on it?

The interesting thing about this is that very few shells, other than
bash, seem to inherit the -v option in subshells.  This looks like a
place where Posix doesn't reflect historical behavior, since Posix says
that subshell environments inherit all options.  I guess it's a question
of when the command in the command substitution is `read'.


``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]