Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Introduction

Hash is a POSIX shell written from scratch in C for Linux, macOS and BSD: one small binary with no dependencies beyond libc, and the comforts people install plugins for (syntax highlighting, autosuggestions, a git-aware prompt, did-you-mean, smart completion) built in.

184 of 186 smoosh POSIX tests pass, 1 skipped on purpose (why), 1 failing. CI measured this on commit f085908 on 2026-11-11 (the run).

Why hash has the longer answer, a feature table against bash, dash, zsh and fish, and how the shell is tested.

Features

  • POSIX Compliance - Works with existing shell scripts and POSIX-standard features
  • Interactive Editing - Full line editing with cursor navigation, history, and tab completion
  • Customizable Prompt - Git integration, colors, and flexible PS1 escape sequences
  • Scripting Support - Variables, control structures, functions, and command substitution
  • Modern Conveniences - Syntax highlighting, autosuggestions, and configurable colors

Quick Start

# Install on macOS
brew install juliojimenez/hash/hash-shell

# Install on Debian/Ubuntu
echo "deb [trusted=yes] https://hash-shell.org/apt/ stable main" | sudo tee /etc/apt/sources.list.d/hash-shell.list
sudo apt update && sudo apt install hash-shell

# Run hash
hash-shell

Command Line Options

OptionDescription
-c stringExecute commands from string
-iForce interactive mode
-l, --loginRun as a login shell
-sRead commands from standard input
-v, --versionPrint version information
-h, --helpShow help message

Example Session

$ hash-shell
hash v54
Type 'exit' to quit

#> echo "Hello, World!"
Hello, World!

#> for i in 1 2 3; do echo "Number: $i"; done
Number: 1
Number: 2
Number: 3

#> exit

Getting Help

License

Hash is open source software licensed under the Apache 2.0 License.


Continue to Installation to get started.