Images of shells by the sea

cjsh – POSIX-oriented shell

CJ’s Shell, also known as cjsh, is a POSIX-oriented shell that combines a standards-focused scripting engine with a modern interactive environment.

It supports familiar Bourne shell constructs and selected Bash-style extensions while aiming to keep ordinary shell scripts portable.

Its interactive layer is built around an embedded line editor and provides multiline editing, syntax highlighting, fuzzy completion, spell correction, persistent history, configurable key bindings and richly styled prompts without requiring a separate framework or plugin collection. The project reports roughly 95% POSIX coverage, tested through more than 1,700 standards-focused tests.

This is free and open source software.

Key Features

  • POSIX-oriented shell scripting engine.
  • Supports if, case, for, while and shell function constructs.
  • Pipelines, redirections, here documents and command substitution.
  • POSIX-style parameter expansion and arithmetic evaluation.
  • Selected extensions include [[ expressions ]] and arithmetic contexts.
  • Brace expansion, here strings and process substitution.
  • Dedicated POSIX mode rejects unsupported non-POSIX syntax and builtins.
  • Foreground and background job control.
  • Builtins include jobs, fg, bg, wait, disown and trap.
  • Configurable handling of background jobs when the shell exits.
  • Multiline command editing with automatic indentation.
  • Optional absolute or relative line numbers.
  • Real-time syntax highlighting for commands, keywords, paths, substitutions and errors.
  • Fuzzy completion for commands, files, options, variables, users and hosts.
  • Completion data learned from PATH and manual pages.
  • Completion menus can display descriptions, sources and exit-status information.
  • Inline completion preview and configurable hints.
  • Command and filename spell correction.
  • Smart cd uses fuzzy matching and frequently visited directories.
  • Persistent, deduplicated command history with recorded exit statuses.
  • Fuzzy forward and reverse history search.
  • Interactive Bash-style history expansion.
  • Customisable Emacs-inspired key bindings.
  • Optional Vim-inspired navigation profile.
  • Create command-driven editor widgets and custom keyboard actions.
  • Mouse support for positioning the cursor and selecting menu entries.
  • Typeahead buffers keystrokes entered while another command is running.
  • Fish-style command abbreviations.
  • BBCode-style markup for left, right and continuation prompts.
  • True-colour prompt and syntax-highlight styling.
  • Right prompt can follow the active cursor row.
  • Configurable precmd, preexec and chpwd hooks.
  • Separate environment, login, interactive and logout startup files.
  • Commands generate starter configuration files with sensible defaults.
  • Minimal mode disables most interactive enhancements.
  • Secure mode prevents user startup files from being loaded.
  • Completion, history, colours and highlighting can be disabled independently.
  • Single executable with its line-editing dependency embedded.
  • Primary support for Linux, macOS and Windows through WSL.

Website: github.com/CadenFinley/CJsShell
Support:
Developer: Caden Finley
License: MIT License

cjsh is written in C++ and C. Learn C++ with our recommended free books and free tutorials.


Related Software

Shells
zshAdvanced and programmable command interpreter
NushellAdopts the Unix philosophy of shells where pipes connect command together
fishSmart and user-friendly command line shell
XonshPython-powered, cross-platform shell language and command prompt
bashsh-compatible command language interpreter
MurexIntuitive, typed and content aware shell
PowerShellCross-platform automation and configuration framework
ElvshExpressive programming language and a versatile interactive shell
OilsBilled as an upgrade to bash. Written in Python.
DASHPOSIX-compliant implementation of sh that aims to be as small as possible
shShell parser, formatter, and interpreter
tcshC shell with file name completion and command line editing
mkshMirBSD Korn shell
ksh Unix shell which was developed by David Korn at Bell Labs
brushPOSIX- and bash compatible shell
RashLanguage, library, and shell REPL for Racket.
ionModern system shell that features a simple, yet powerful, syntax
YashYet another shell
okshPortable OpenBSD ks
esExtensible shell with higher-order functio
duneA shell by the beach
coshConcatenative command-line she
gshPOSIX-compatible generative shell
arshStatically typed scripting language with shell-like features
Sushi shellBash clone shell implemented in Rust
fortshShell written in Fortran
hshSlightly different take on your shell
ReShellModern shell
rashRudimentary shell
DaxCustom Unix shell implementation

Read our verdict in the software roundup.


Best Free and Open Source Software Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.

This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more.

Discovered a useful open source Linux program that we haven’t covered yet? Let us know by completing this form.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted