Portable OpenBSD ksh, based on the Public Domain Korn Shell (pdksh).
Switch branches/tags
Nothing to show
Clone or download
Permalink
Failed to load latest commit information.
CVS Small commit to tag for release. This matches OpenBSD 6.4. Oct 9, 2018
.gitignore Add pconfig.h to .gitignore Jun 3, 2018
.travis.yml Fix Travis-CI build Jan 7, 2018
CONTRIBUTORS Import oksh Jan 6, 2015
LEGAL Import oksh Jan 6, 2015
NOTES Add check for confstr() and minimal portable implementation of it. Jan 13, 2018
PROJECTS Sync with OpenBSD. Add configure check for -w flag; use it if your co… Jan 12, 2018
README.md Small commit to tag for release. This matches OpenBSD 6.4. Oct 9, 2018
README.pdksh Update to latest OpenBSD ksh code. Add Cygwin support. Sep 17, 2017
alloc.c Update to latest upstream code. Jan 17, 2018
asprintf.c asprintf.c - stray whitespace Jun 6, 2018
c_ksh.c type is now a shell built-in instead of an alias May 20, 2018
c_sh.c Update to latest ksh(1) code. This changes all use of long to Apr 21, 2018
c_test.c Avoid conflict on systems which have gmatch in libgen, ie Solaris Sep 29, 2018
c_test.h Import oksh Jan 6, 2015
c_ulimit.c Update to latest ksh(1) code. This changes all use of long to Apr 21, 2018
charclass.h Convert GNU make to a configure script and POSIX make. Jan 7, 2018
config.h Update to latest code. Jan 16, 2018
configure We're approaching OpenBSD 6.4 now; this is close to what will be Sep 23, 2018
confstr.c Add check for confstr() and minimal portable implementation of it. Jan 13, 2018
edit.c Avoid conflict on systems which have gmatch in libgen, ie Solaris Sep 29, 2018
edit.h We're approaching OpenBSD 6.4 now; this is close to what will be Sep 23, 2018
emacs.c Correct #elif statements in emacs.c and var.c to use defined operator Sep 29, 2018
eval.c Avoid conflict on systems which have gmatch in libgen, ie Solaris Sep 29, 2018
exec.c Avoid conflict on systems which have gmatch in libgen, ie Solaris Sep 29, 2018
expand.h Convert GNU make to a configure script and POSIX make. Jan 7, 2018
expr.c Update to latest ksh(1) code. This changes all use of long to Apr 21, 2018
history.c Update to latest code. Jan 16, 2018
io.c If F_DUPFD_CLOEXEC missing use F_DUPFD and set FD_CLOEXEC Jun 4, 2018
jobs.c This is the OpenBSD 6.3 ksh. Apr 2, 2018
ksh.1 We're approaching OpenBSD 6.4 now; this is close to what will be Sep 23, 2018
lex.c Update to latest code. Jan 16, 2018
lex.h Update to latest code. Jan 16, 2018
mail.c We're approaching OpenBSD 6.4 now; this is close to what will be Sep 23, 2018
main.c From upstream: export PWD and OLDPWD Sep 30, 2018
misc.c Avoid conflict on systems which have gmatch in libgen, ie Solaris Sep 29, 2018
oksh.1 Update to latest OpenBSD ksh code. Add Cygwin support. Sep 17, 2017
path.c Convert GNU make to a configure script and POSIX make. Jan 7, 2018
portable.h Add includes and defines to portable.h for Solaris Sep 29, 2018
prescue.h Check for pledge in configure. Lets oksh build on old versions of Ope… Jan 12, 2018
profile Update to latest OpenBSD ksh code. Jun 8, 2015
reallocarray.c Check for pledge in configure. Lets oksh build on old versions of Ope… Jan 12, 2018
rescue.sh Add asprintf to rescue script. Sep 23, 2018
sh.1 From upstream: export PWD and OLDPWD Sep 30, 2018
sh.h Avoid conflict on systems which have gmatch in libgen, ie Solaris Sep 29, 2018
shf.c This is the OpenBSD 6.3 ksh. Apr 2, 2018
shf.h Update to latest OpenBSD ksh code. Add Cygwin support. Sep 17, 2017
siglist.c Build oksh with musl-libc (checked with Alpine Linux). Jan 14, 2018
signame.c Check for pledge in configure. Lets oksh build on old versions of Ope… Jan 12, 2018
strlcat.c Check for pledge in configure. Lets oksh build on old versions of Ope… Jan 12, 2018
strlcpy.c Check for pledge in configure. Lets oksh build on old versions of Ope… Jan 12, 2018
strtonum.c Check for pledge in configure. Lets oksh build on old versions of Ope… Jan 12, 2018
syn.c Update to latest OpenBSD code. May 3, 2018
sys-queue.h Have all OS's always use portability queue routines. Jul 28, 2018
table.c Update to latest upstream code. Jan 17, 2018
table.h We're approaching OpenBSD 6.4 now; this is close to what will be Sep 23, 2018
trap.c This is the OpenBSD 6.3 ksh. Apr 2, 2018
tree.c Update to latest ksh(1) code. This changes all use of long to Apr 21, 2018
tree.h Update to latest OpenBSD ksh code. Add Cygwin support. Sep 17, 2017
tty.c If F_DUPFD_CLOEXEC missing use F_DUPFD and set FD_CLOEXEC Jun 4, 2018
tty.h Update to latest OpenBSD ksh code. Add Cygwin support. Sep 17, 2017
unvis.c Check for pledge in configure. Lets oksh build on old versions of Ope… Jan 12, 2018
var.c Correct #elif statements in emacs.c and var.c to use defined operator Sep 29, 2018
version.c Import oksh Jan 6, 2015
vi.c This is the OpenBSD 6.3 ksh. Apr 2, 2018
vis.c Check for pledge in configure. Lets oksh build on old versions of Ope… Jan 12, 2018
vis.h Build oksh with musl-libc (checked with Alpine Linux). Jan 14, 2018

README.md

oksh

Portable OpenBSD ksh(1).

Why?

Because all operating systems deserve a good shell.

Supported systems

oksh is known to run on the following Operating Systems:

  • OpenBSD
  • FreeBSD
  • DragonFly BSD
  • NetBSD
  • HardenedBSD
  • SoloBSD (as the default shell)
  • Mac OS X
  • Linux (glibc and musl)
  • Cygwin
  • Android (via Termux)
  • AIX (with major thanks to @tssva and @NattyNarwhal)
  • IBM i PASE
  • Solaris
  • Illumos

Running on a system not listed here? Add it and send a pull request!

Believed working

We believe that oksh will work on the following platforms, but testing is needed. Help is greatly appreciated and encouraged!

  • HPUX
  • Irix

Supported compilers

oksh is known to build with the following C compilers:

Building with a compiler not listed here? Add it and send a pull request!

Packages

oksh is included in some package systems.

Using a package not listed here? Add it and send a pull request!

Dependencies

A C99 compiler is the easiest way to ensure that oksh will build correctly. Please see the list of C compilers above for a list of known working compilers.

Though not required, the ncurses library will be used for screen clearing routines if the library is found during the configure stage. This can be turned off by the user by passing the --disable-curses flag to configure.

A configure script that produces a POSIX Makefile is provided to ease building and installation and can be run by:

$ ./configure
$ make && sudo make install

In case of emergency

If you cannot execute make for whatever reason, a rescue script, rescue.sh, is available. This script contains nothing more than a hand-written list of compiler invocations which will build oksh in the most basic and portable way possible. This rescue shell is perfectly usable (as it is just an unoptimized build).

License

The main Korn shell files are public domain (see LEGAL). Portability files are BSD or ISC licensed; see individual file headers for details.

Get a tarball

See releases tab. The latest release is dated 20181009, which matches OpenBSD 6.4.