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

Interactive Features

Hash shell includes powerful interactive features for efficient command-line use.

Features Overview

FeatureDescription
Line EditingCursor navigation, editing shortcuts
Tab CompletionComplete commands, files, directories
Command HistoryNavigate and search previous commands
Prompt CustomizationGit integration, colors, custom format

Quick Reference

Line Editing

KeyAction
Ctrl+AMove to beginning of line
Ctrl+EMove to end of line
Ctrl+UDelete to beginning
Ctrl+KDelete to end
Ctrl+WDelete word backward
Ctrl+LClear screen
Ctrl+CCancel current line

History Navigation

KeyAction
UpPrevious command
DownNext command
!!Repeat last command
!nRun command number n
!prefixRun last command starting with prefix

Tab Completion

ContextCompletes
First wordCommands, aliases, builtins
Other wordsFiles, directories
Double TABShow all matches

Default Prompt

The default prompt shows:

/home/user/projects git:(main) #>
  • Blue path
  • Green/Yellow git status (clean/dirty)
  • Cyan branch name
  • Blue/Red #> based on exit code

Configuration

Configure interactive features in ~/.hashrc:

# Custom prompt
set PS1='\W\g \e#>\e '

# Enable colors
set colors=on