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 modern, POSIX-compliant command line interpreter for Linux, macOS, and BSD.

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 v34
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.