The MirBSD Korn Shell (mksh) is an actively developed successor of pdksh (the Public Domain Korn Shell), aimed at producing a shell good for interactive use, but with the primary focus on scripting. It is intended to be portable to most *nix-like operating systems as long as they're not too obscure. mksh incorporates improvements from OpenBSD and Debian, as well as bugfixes and enhancements developed for the MirOS, FreeWRT, and MidnightBSD projects and Android. The emacs command line editing mode is UTF-8 capable, and Byte Order Marks are ignored in scripts. The shell supports large files, as well as all pdksh and some csh, AT&T ksh, zsh, and GNU bash features, is compatible with the Bourne shell and POSIX (within limits), has no limit on array sizes, and incorporates some other useful builtins and features. While being already fast and small (without losing functionality), flags to make it even smaller can be given at compile time. An interactive shell reads "~/.mkshrc" on startup.
| Tags | Shells |
|---|---|
| Licenses | MirOS |
| Operating Systems | Mac OS X Windows Windows Cygwin POSIX BSD GNU/Hurd Linux IRIX AIX HP-UX Android iPhoneOS Maemo Minix 3 Haiku FreeMiNT OSF/1 Tru64 ULTRIX QNX Solaris |
| Implementation | Unix Shell C |
Recent releases


Release Notes: This release fixes a nasty regression introduced in R40e. The persistent history code can now use fcntl when flock is not usable, making it available on more systems for those who really want/need to use it. Both the shell and the regression testsuite have reduced system dependencies (str{,n}case{cmp,str}, POSIX.pm, env, id, printf). The Emacs commandline editing code checks the goto position better against buffer bounds. New targets are available: BeOS, Dell Unix (only with cc, not with gcc), LynxOS, NeXTstep, SCO OpenServer, and SCO UnixWare (including USL C compiler).


Release Notes: This must-have update collects bugfixes from three months, including better standards compliance (the IFS test suite now passes), several tab completion-related bugs (UTF-8, backslash-escaped filenames), fixes for the worst problems with persistent history code (use of it is still discouraged), a bugfix for using time in $(…), and better UTF-8 and $COLUMNS/$LINES handling. The sleep builtin is no longer interrupted by SIGWINCH. Support for SkyOS, both Minix 3, QNX, Android, BSD/OS, Cygwin, Interix, and non-GCC has improved. Deprecated features now issue a warning. Most importantly, I/O redirecting an "if" block works again (BZ#496791).


Release Notes: This release fixes several small bugs in sh compatibility, UTF-8 handling, Emacs mode, and the build system. It includes some additions to the man page as well as portability fixes for Openstep, Interix, and Hurd and a new port to MSYS.


Release Notes: This release fixes several obscure ways the shell could crash the tty, freeze, or refuse to start. The tab completion user experience was improved to allow ^Cing out of cat. The setenv function was added to the default ~/.mkshrc file. The documentation better explains that echo is not portable and which startup files are read. Manpage legibility was improved. The new “global” special built-in command was added, doing the same as “typeset” (“local”) except making every touched parameter local to the function even if it existed before. Compiler/linker errors are caught earlier. Some compiler warnings were fixed.


Release Notes: cat and sleep were added as builtins. The Android, FreeMiNT, and Haiku platforms are now supported. Many interactive improvements were made. The behavior was aligned with POSIX/SUSv4 (parameter expansions, etc). Link time optimization and LLVM Dragonegg are supported. Overly complicated code was replaced with simpler, smaller, faster, and more correct code. Unicode support was synchronized with version 6.0.0 of the standard. A lot of bash/ksh93/zsh extensions are supported: $"…", ${PIPESTATUS[*]}, case ;& and ;|, x+=y, x+=(y z), etc. A new recursive parser fixes command substitution. Functions inherit “set -x”. The "read" builtin can read (up to) n bytes into an array of words or char, with a timeout. "Here document" handling was improved.
Recent comments
07 Apr 2009 23:01
No further Freshmeat announcements
will be sent out. The MirOS Project
now provides an RSS Feed themselves.
This is due to the changes on the
website, making it much harder to
use than even before.
24 Jul 2008 11:03
Ports
I changed the Debian package URI to the official
Debian site, as the mksh package is kept up to
date inside Debian by myself.
The sub-directory ports/ inside the mksh download
directory (currently) contains ports for
o Debian (source, diff, signed dsc)
o RPM (signed Source RPM)
o OpenBSD (gzsig'd tgz of port)
o pkgsrc® (gzsig'd tgz of source package)
For more information, refer to the website, under
the item Integration in other OSes / build systems.
24 Apr 2007 05:07
Missing info...
... from the announcement:
BONUS for this release:
- OS-independent source RPM, based upon Pascal Bleser's SuSE-SRPM:
- OpenBSD port (tested on 4.1/sparc64):
- NetBSD® pkgsrc® source package (tested on Interix/SFU 3.5 on win2k/i386):
(the BSD ports URI is for FreeBSD; the MirPorts
Framework has already been updated with this
release of mksh)