Subject: Re: ksh bugs and behaviour questions
To: None <tech-userlevel@netbsd.org>
From: Jan Schaumann <jschauma@netbsd.org>
List: tech-userlevel
Date: 12/09/2002 15:48:11
Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at> wrote:
> I've tried using ksh in current (from Nov 5) for a bit, and I stumbled
> over the following bugs and differing behaviour compared to bash:

>   bash does this
>   bash does this, and I prefer it to ksh's behaviour
>   bash does this;
>   bash does this, and I prefer it to having to type 'clear' :)
>   bash does this, and I think it's a useful feature.
>   bash does this...

Uhm, ``use bash, then''? ;-)

In general, I believe you described mostly differences based on what you
expect.

As for expansion, in vi-mode that seems to work a bit better than in
emacs-mode:

    $ mkdir test<RET>
    $ cd test<RET>
    $ mkdir a\'b<RET>
    $ touch a<CTRL-F>

However, not prefectly:

    $ mkdir test<RET>
    $ cd test<RET>
    $ mkdir a\'b<RET>
    $ mkdir a<RET>
    $ touch a<CTRL-E>
    1) a'b/
    2) a/
    $ touch a\'<CTRL-F>
    $ touch a'<CTRL-F>

> . if leaving ksh with CTRL-D, no new line character emitted

I'm not sure I know what you mean:

(becasse) ksh
(becasse) ^D
(becasse) bash
[becasse]$ bash
[becasse]$ exit
[becasse]$ exit
(becasse) 

No new line character?


But while we're bashing ksh (how clever):  pdksh does not allow for
variable-substitution on-they-fly:
export FOO="bar baz blah"
echo ${FOO/ /_/g}

ksh93 does - and this is something that would be useful in pdksh.

-Jan

-- 
I seem to be having this tremendous difficulty with my lifestyle.