Interactive Features
Configuration Directory
Section titled “Configuration Directory”~/.lash/ config # shell configuration history # aggregated command usage sessions/ # one file per session, timestamped plugins.conf # plugin registration plugins/ # plugin sockets roles.conf # custom role definitions audit.log # audit log audit.key # audit key file lashd.sock # daemon socket lashd.pid # daemon PIDConfiguration File
Section titled “Configuration File”On interactive startup, lash reads ~/.lash/config. This file can contain:
- Variable declarations (
let/mut) - Aliases
- Function definitions
- Prompt configuration
- Hook configuration
- Environment variable overrides
- Role and audit settings
For non-interactive (script) execution, ~/.lash/config is not loaded. Scripts run in a clean environment with only inherited environment variables.
Prompt Customization
Section titled “Prompt Customization”mut PROMPT = "$PWD > "mut PROMPT = "$(basename PWD) > "Aliases
Section titled “Aliases”alias ll = `ls -la`alias gs = `git status`Aliases expand in command position only. Typically stored in ~/.lash/config.
Smart History
Section titled “Smart History”History is an aggregated index sorted by usage frequency, not a chronological log. Each entry tracks:
- Command text
- Usage count
- Last used timestamp
- Average execution time
New commands increment existing entries rather than appending duplicates.
History is queryable via functional chains:
history.filter(h => h["cmd"].contains("docker")).sort(h => h["count"]).reverseSession Recording
Section titled “Session Recording”Every interactive session is recorded in ~/.lash/sessions/ as a timestamped JSONL file containing commands, exit codes, error output, and working directory.
Tab Completion
Section titled “Tab Completion”Context-aware completion:
- Command position: binary names from PATH, user functions, built-ins.
- After backtick-dot: built-in methods.
- After
.json+ bracket: JSON keys (if known from previous run). - File paths: file and directory names.
- History-informed: frequent commands rank higher.
lash can load existing zsh completion definitions from standard locations (/usr/share/zsh/site-functions/, ~/.zsh/completions/) as a fallback. Native lash completions take priority.