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

Shell (Bash)

Install

macOS

npm install -g bash-language-server

Linux

npm install -g bash-language-server

Windows

npm install -g bash-language-server

Config

Add to ~/.config/catenary/config.toml:

[server.bash-ls]
command = "bash-language-server"
args = ["start"]

[language.shellscript]
servers = ["bash-ls"]

Notes

  • The language ID is shellscript, not bash or sh
  • Works with .sh, .bash, .zsh files
  • Provides completions for commands, variables, and functions
  • Integrates with ShellCheck for linting (install separately)

Optional: ShellCheck Integration

For better diagnostics, install ShellCheck:

# macOS
brew install shellcheck

# Linux (Debian/Ubuntu)
apt install shellcheck

# Linux (Arch)
pacman -S shellcheck

The language server will automatically use it if available.