bug-bash
[Top][All Lists]
Advanced

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

Echoing commands in vi visual mode


From: Ondrej Oprala
Subject: Echoing commands in vi visual mode
Date: Wed, 11 Jun 2014 12:35:12 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

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.
Steps to reproduce:
1. set -o vi
2. meta+k
3. v
4. for i in $(seq 10); do j=$( echo $i$i ); echo $j; done
echo second
# save and close the editor

Results in 4.{1,2}:

# set -o vi
for i in $(seq 1 10);do    j=$(echo $i$i );    echo $j; done
seq 1 10)
seq 1 10
echo $i$i )
echo $i$i
11
echo $i$i )
echo $i$i
22
echo $i$i )
echo $i$i
33
echo $i$i )
echo $i$i
44
echo $i$i )
echo $i$i
55
echo $i$i )
echo $i$i
66
echo $i$i )
echo $i$i
77
echo $i$i )
echo $i$i
88
echo $i$i )
echo $i$i
99
echo $i$i )
echo $i$i
1010
echo second
second

Results in 4.3:
# set -o vi
for i in $(seq 1 10);do    j=$(echo $i$i );    echo $j; done
seq 1 10
echo $i$i
11
echo $i$i
22
echo $i$i
33
echo $i$i
44
echo $i$i
55
echo $i$i
66
echo $i$i
77
echo $i$i
88
echo $i$i
99
echo $i$i
1010
echo second
second

Results in ksh:

# set -o vi
for i in $(seq 1 10);do    j=$(echo $i$i );    echo $j; done
11
22
33
44
55
66
77
88
99
1010
second

What then, does upstream consider correct behaviour?
Thanks




reply via email to

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