Subject: ksh bugs and behaviour questions
To: None <tech-userlevel@netbsd.org>
From: Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
List: tech-userlevel
Date: 12/09/2002 20:59:48
Hi!

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:

. ctrl-y doesn't append to last ctrl-y
  bash does this, and I find it quite nice when wanting to some parts in
  the middle of a previous line
. ctrl-r doesn't search in current line
  bash does this, and I prefer it to ksh's behaviour of starting in the
  previous line in the history; good if you want to e.g. change the flags
  given to the current command
. expansion does not work correctly in many cases.
  This is a bug. Details:
  . directories containing a single quote or double quote.
    > mkdir test<RET>
    > cd test<RET>
    > mkdir a\'b<RET>
    > touch a<TAB>
    > touch a\'b/<TAB>
    > touch a\'b/'b/<TAB>
    > touch a\'b/'b/'b/<TAB>
    ...
  . same as above, but not quite that bad with '?':
    for every tab, a list of completing directories is shown
    > ll a?b/<TAB>
    a?b/
    > ll a?b/<TAB>
    a?b/
  . same as above, but with '$':
    > ll a\$b/<TAB>
    > ll a\$b/ a\$b/<TAB>
    > ll a\$b/ a\$b/ a\$b/<TAB>
    ...
  . backslash is fine.
  . probably some more, but I didn't test all characters needing quoting
. <UP><DOWN> doesn't give back an empty line
  bash does this; ksh remains on the last line in the history
. ctrl-l on empty line does not clear(1)
  bash does this, and I prefer it to having to type 'clear' :)
. first command line argument gets expanded even to non-executable files
  bash does this, and I think it's a useful feature.
. completion does not offer .* files at all except if . is prepended by the user
  One could argue over this one. I'm not sure which I prefer.
. completion does not work on incomplete variables ($HO<TAB>) or user names
  (~wi<TAB>)
  bash does this...
. completion does not append '/' to ..
  For me, this one's a bug.
. if leaving ksh with CTRL-D, no new line character emitted
  Nit, I know.

So how many of the above describe changes that _should not_ be done to ksh?

Bye,
 Thomas

-- 
Thomas Klausner - wiz@danbala.ifoer.tuwien.ac.at
What is wanted is not the will to believe, but the will to find
out, which is the exact opposite. -- Bertrand Russell