Configuration Reference
Boring, complete, searchable.
Config file location
Create it if it doesn't exist. All fields are optional.
Shell
editor = "nvim" # External editor for complex edits
keybindings = "emacs" # Readline compatibility mode
dialect = "bash" # Parser dialect: "bash" (default) or "zsh" (experimental)
disable_builtins = ["cd"] # Optional: needed if you alias cd="z"
init_commands = [ # Always run at startup
"source ~/.aliases"
]
[shell.startup_files]
login = ["/etc/profile", "~/.profile", "~/.hash_profile"]
interactive = ["~/.hashrc"]
Shell dialect (experimental zsh)
Hash parses commands, source, eval, startup files, and migrated files as bash by default. Set dialect = "zsh" to opt into zsh parsing instead. Upstream zsh support in the mvdan.cc/sh interpreter is experimental and incomplete, so shell/editor integration builtins such as bindkey, setopt, compdef, and zstyle remain compatibility no-ops.
The default startup files stay Hash-specific even in zsh mode. To source your zsh startup files directly, configure them explicitly:
dialect = "zsh"
[shell.startup_files]
login = ["/etc/zprofile", "~/.zprofile", "~/.hash_profile"]
interactive = ["~/.zshrc", "~/.hashrc"]
Hooks
chpwd = [ # Run when working directory changes
"zoxide add -- \"$PWD\"",
]
The chpwd hook runs after every directory change (both cd and interpreter-level cd). This replaces bash's PROMPT_COMMAND for tools that need directory tracking. See Integrations for setup guides.
Input
keybindings = "helix" # "helix", "emacs", "vim"
gutter = true # Show visual indicator for multiline
max_paste_size = "10MB" # Maximum paste size (truncates larger pastes)
Note: Pastes larger than max_paste_size are silently truncated to prevent memory exhaustion. The default of 10MB handles most use cases.
Prompt
mode = "starship" # "starship", "built-in", "none"
starship_path = "/opt/starship/starship" # Explicit path (optional)
alignment = "left" # Built-in prompt alignment hint
Agent
Hash runs one selected agent at a time. Use a flat [agent] config, or define named [agent.<name>] entries and select one with default.
For Claude over ACP, install the current adapter with npm install -g @agentclientprotocol/claude-agent-acp and use command = "claude-agent-acp".
Flat ACP/stdio transport
transport = "stdio"
command = "claude-agent-acp"
Named agents
default = "ollama"
timeout = "120s"
allowed_commands_scope = "project"
[agent.claude]
transport = "stdio"
command = "claude-agent-acp"
[agent.ollama]
transport = "http"
url = "http://localhost:11434/api/generate"
model = "codellama:13b"
headers = { Authorization = "Bearer token" }
History
enabled = true
path = "~/.local/share/hash/history.db"
# max_entries and max_age are reserved; retention is not enforced in 0.6.x
Completions
fuzzy = true # Enable fuzzy matching
file_icons = true # Show file type icons (requires nerd font)
cobra_enabled = true # Enable Cobra __complete support
mask_sensitive_env = true # Hide API keys/secrets in env completion previews
Clipboard
max_output_size = "1MB" # Max output per command
buffer_size = 100 # Commands to keep in buffer
preserve_colors = false # Keep ANSI codes when copying
Prediction (adaptive learning)
enabled = true
confidence_threshold = 0.6 # Minimum score to suggest
accept_keys = ["right", "tab"] # Keys to accept prediction
path_min_count = 2 # Uses before suggesting path
path_recency_boost_hours = 24 # Recency boost window
Environment variables
| Variable | Purpose |
|---|---|
HASH_SHELL=1 | Set by Hash — detect you're in Hash |
HASH_CONFIG_DIR | Override config directory |
XDG_CONFIG_HOME | Change the default config root |
XDG_DATA_HOME | Change the default data root |
HASH_CLIPBOARD_MAX_OUTPUT_SIZE | Override command output capture size |
Files
| Path | Purpose |
|---|---|
~/.config/hash/config.toml | Main config |
~/.hashrc | Interactive shell startup (like .bashrc) |
~/.hash_profile | Login shell startup (like .bash_profile) |
~/.local/share/hash/history.db | Command history (SQLite) |
~/.local/share/hash/learning.db | Learned error fixes (SQLite) |