nsh: a POSIX shell in Rust that borrows the real Bash for completions
A command-line shell like fish, but POSIX compatible.
At a glance
- What is it?
- nsh is an interactive shell written in Rust that aims at POSIX compliance with a few Bash extensions, ships tab completion and syntax highlighting, and is still described by its author as alpha software with Bash features missing.
- Who is it for?
- nsh suits a person who wants fast interactive commands with traditional POSIX syntax and does not want to maintain a configuration file, and it does not suit a production machine that depends on Bash scripts and Bash specific features today.
- Can I use it commercially?
- Not without permission. GitHub finds no licence file in the repository, and without a licence all rights are reserved by default: you may read the code but not reuse it. Check the README, or ask the authors, before using it.
- Is it still maintained?
- Yes. The repository last received commits 27 days ago.
- What is it written in?
- Mainly Rust, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 22, 2026, and from our analysis. They are not legal advice.
Editorial analysis
nsh borrows Bash for completion instead of reimplementing it
The idea behind nsh is easy to state and unusual in practice. Most shells that want rich completion either ship their own completion engine or ask the user to configure one. nsh takes a third route: it provides Bash completion support by internally invoking the genuine Bash. The shell is not a Bash clone and does not try to be one. It is described as a POSIX compliant interactive shell with some Bash extensions, and it adds tab completions and syntax highlighting on top of that. The practical consequence is that a completion script written for Bash is reachable from nsh without a port, because the work of asking Bash what completes is done by Bash itself. What you get in the prompt is POSIX syntax with a Bash assisted completion layer.
The parsing stack is pest, and the terminal is crossterm
nsh is written in Rust, and the dependency list in Cargo.toml shows how the pieces are arranged. The parsing side is handled by pest and pest_derive, a parser generator, and the Cargo.toml include list reserves a place for grammar files with the `**/*.pest` pattern, which is where a shell like this keeps its syntax definitions. On the terminal side, crossterm at ^0.18 handles the interactive layer, which is what makes syntax highlighting and the prompt possible, and signal-hook covers signal handling so that a running child process can be interrupted. Everything else is small and conventional: structopt for argument parsing, glob for pattern matching, dirs for locating configuration directories, phf for compile time maps, nix and libc for the POSIX calls, and the fern and log pair for logging. The release profile is tuned for a fast binary, with opt-level 3, link time optimisation, a single codegen unit and debug assertions turned off.
cargo install nsh is the whole installation story
The shell is published on crates.io, so a Rust toolchain and one command are enough.
$ cargo install nshThere is no configuration file to write before the first prompt. The feature list advertises built-in zero configuration features, and that is what you get on a fresh machine: the shell starts, it completes, it highlights, and there is no zshrc equivalent to maintain. The motivation is explicit in the project notes. The author describes Bash as the best for executing shell scripts but not satisfactory in interactive mode, and describes their own history as a decade of zsh use where they never needed heavy customizability and eventually got tired of tuning the zshrc. Fish is called neat, but the author prefers old-fashioned, traditional and ergonomic shell syntax. The first real use, then, is simply to install the binary and drive it with POSIX commands, and to decide separately whether the completion layer is worth keeping Bash around for.
Alpha stage means the Bash feature set is not there yet
This is the limitation that matters most, and the project states it without hedging. nsh is in alpha stage, with many missing features which Bash provides, kludges in the source code, and bugs that must be present. That admission is why the author asks for help to make the shell practical for daily use. Concretely, an interactive shell needs more than a parser, a completion layer and a prompt: job control, redirection edge cases, quoting corner cases, arithmetic, history handling and the long tail of small utilities that users assume without noticing. The README does not enumerate which Bash features are missing, so an evaluation has to be empirical rather than a checklist read. It also means there are no GitHub releases for the project, so there is no tagged changelog to read either; the version tracked in Cargo.toml is 0.4.2, and the crate on crates.io is what you would pin.
Documentation lives in the repository, not on a hosted site
The documentation for nsh is a directory in the repository rather than a separate site, and the root of the project shows how it is assembled. There is a docs directory, a book.toml file at the root and a requirements.txt that contains a single entry, termcolor. That layout is the mdBook convention, so the manual is versioned with the code and read in the same browser as the source. Next to it sits the test directory, a test.py file and Cargo.toml dev dependencies on pretty_assertions and tempfile, which points at a test suite that runs on Python for the end to end parts and uses Rust assertions for the unit level. The continuous integration badge in the README points at a workflow that runs on the master branch, so every push is exercised against that suite.
CC0 or MIT, and a shell you install from crates.io
Licensing is unusually generous here, and the choice is deliberate. The README states CC0 or MIT, choose whichever you prefer, and Cargo.toml records the same thing in standard form as license = "CC0-1.0 OR MIT". CC0 is a public domain dedication with no attribution requirement, while MIT is the permissive licence most Rust projects already carry, so a company with a policy against public domain dedications can take MIT and change nothing in the codebase. The project has no GitHub releases, so the crates.io version is the artifact to track, and the version currently declared in Cargo.toml is 0.4.2 with edition 2018. The last push to the repository was on 2026-09-26. Taken together with the alpha status, the shape of the project is clear: a single author, a permissive licence, a published crate, and an explicit invitation for people to report bugs with a minimal reproducible example attached.
Editorial conclusion
nsh suits a person who wants fast interactive commands with traditional POSIX syntax and does not want to maintain a configuration file, and it does not suit a production machine that depends on Bash scripts and Bash specific features today. Verify three things before switching your prompt to it: which of your daily commands rely on Bash extensions, whether the missing features on the alpha list affect your work, and how the internal call to the genuine Bash behaves in your environment. The Cargo.toml version is 0.4.2, the licence is CC0-1.0 OR MIT, and the last push was on 2026-09-26.
Frequently asked questions
How do I install nsh?
nsh is published on crates.io, so running cargo install nsh installs the shell. The project advertises built-in zero configuration features, so there is no config file to write before the first prompt.
Is nsh POSIX compatible and can it run Bash scripts?
nsh is described as a POSIX compliant interactive shell with some Bash extensions. The author also states that the shell is in alpha stage with many features which Bash provides still missing, so script compatibility is not complete.
How does nsh handle Bash tab completion?
nsh provides Bash completion support by internally invoking the genuine Bash, rather than shipping its own completion engine. Tab completion and syntax highlighting are built into the shell.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/nuta-nsh)Was this useful?