8000 oksh not compliant with ksh88 vi-editing mode? · Issue #64 · ibara/oksh · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
oksh not compliant with ksh88 vi-editing mode? #64
Open
@kajukenbo

Description

@kajukenbo

I have tested oksh on a couple of OpenBSD systems as well as this port on Debian (Devuan) and I am having a problem.
I am wondering if it is user error. I thought I might ask here before heading upstream.

Example:

$ oksh

$ set -o vi ; set -o viraw ; set -o posix

$ for I in a b c

do
echo $I
done
a
b
c

So far so good, but:

^[k
$ done

This behavior is unusual, per ksh88, ksh93, and each "commercial POSIX" implementation I have noticed (AIX, HP-UX).
oksh is actually similar to the way GNU Bash works in this case.

$ fc -l
1 set -o vi ; set -o viraw ; set -o posix
2 for I in a b c
3 do
4 echo $I
5 done

Notice how the for loop in history is "split"; each command is on 1 line instead of together.

Compare to the common/classic behavior:

$ for I in a b c

do
echo $I
done
a
b
c

^[k
$ for I in a b c^Jdo^Jecho $I^Jdone

This allows direct command editing and execution of the entire loop within vi, by pressing "v".

$ fc -l
1 set -o vi ; set -o viraw ; set -o posix
2 for I in a b c
do
echo $I
done

Is this "splitting" the "expected" behavior in oksh? If so, is there a way to get the "classic" behavior of ksh88's vi-mode or should I just use a different shell?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0