1

I'm using mksh (the MirBSD Korn Shell) on Windows 10. I'm used to the old UWin ksh not caring about case on Win7, and have been tripped up several times when 'ls' doesn't see a file because of casing:

    PC> ls *old
    ls: cannot access '*old': No such file or directory
    PC> ls *OLD
    filename.OLD  testing.OLD

I've tried "set completion-ignore-case on", "typeset -l", "shopt -s nocaseglob" and similar bash-isms. What will work for ksh?

Note: This is not a request for case insensitivity in regexps. Thanks

murspieg
  • 144
  • 2
  • 14

1 Answers1

2

mksh developer here.

This is not going to happen (especially not as filesystems are usually case-sensitive, and can be set to be it even on Windows/NT and Mac OSX).

You can glob case-insensitively explicitly with ls *.[Oo][Ll][Dd], but that’s it.

mirabilos
  • 5,123
  • 2
  • 46
  • 72
  • Thanks for answering so quickly! But I don't understand: Other shells running atop Windows (like the old ksh, among others) accomplish case insensitivity. Why "This isn't going to happen"? Because there's not enough demand, or because it's too difficult? – murspieg Feb 01 '17 at 03:10
  • One of `mksh`’s biggest strengths is that it behaves **consistent _across all supported_ operating environments**. That means, no special treatment for (almost; there are Android-, Plan 9- and MirBSD-specific quirks in there that don’t affect the shell though) anyone. For example, mksh on Windows or OS/2 won’t use CRLF line endings either, leading to maximum script compatibility (the “mksh-os2” fork however does). • Also, you’re most likely not running mksh on Windows, but either on Cygwin or so, or on the Ubuntu-on-Windows thing; both are Unix environments. – mirabilos Feb 01 '17 at 10:34
  • Understood. (Actually, I'm running atop UWin's ksh because I prefer its window options for paste.) Thanks for taking time to reply. – murspieg Feb 01 '17 at 19:05