On this page

Files and integrations of the shared shell configuration. For the load order, see Shell startup.

Support levels

ShellSupportEntry points
ZshFull.zshenv, .config/zsh/.zprofile, .config/zsh/.zshrc
BashFull.bash_profile, .bashrc
POSIX shBaseline.profile, $ENV → .config/sh/.shrc

Profile modules

Loaded by .profile for login shells, in .config/sh/profile.d/:

FilePurpose
10_functions.shSet _shell and LOCAL_OS; define path_add, has, source_cache
20_env.shConfigure XDG application paths, editors, pagers, and mise shims

Interactive modules

Loaded by .config/sh/.shrc for interactive shells, in .config/sh/sh.d/:

FilePurpose
10_interactive.shPer-shell history files, history capacity, and vi mode
20_aliases.shPortable aliases, including dotfiles
30_search.shSkim, FZF, Atuin, and Zoxide by shell capability
40_tools.shPrompts, language managers, SDKMAN, AWS completion, and kubectl completion for Bash and Zsh
90_prompt_osc133.shPortable OSC 133 prompt markers for POSIX sh on supported terminals

Zsh modules

Loaded by .config/zsh/.zshrc in lexical order, in .config/zsh/zsh.d/:

FilePurpose
0_base.zshrcZsh history behavior
90_osc133.zshrcOSC 133 prompt hooks on supported terminals
999_zsh.zshrcZsh plugins, the fallback prompt, and Atuin

Functions

FunctionBehavior
has COMMANDSucceed when COMMAND is an executable on PATH
path_add DIRPrepend DIR to PATH unless present
source_cache CACHE_FILE COMMAND [ARG ...]Cache and source the output of COMMAND; skip missing tools

Integrations

IntegrationPOSIX shBashZsh
mise shimsYesYesYes
mise activateNoYesYes
Skim/FZF command defaultsYesYesYes
Skim/FZF completion and bindingsNoYesYes
AtuinNoYesYes
Zoxidezoxide init posixYesYes
StarshipNoYesYes
Spaceship fallbackNoNoYes
rbenv/jenv hooksNoYesYes
SDKMANNoYesYes
AWS completionNoYesNo
kubectl completionNoYesYes

Bash loads AWS CLI completion from aws_completer, or from aws_bash_completer on older installations.

History

ShellFileShell-specific controls
POSIX sh$XDG_STATE_HOME/.sh_historyOnly in sh implementations that support HISTFILE
Bash$XDG_STATE_HOME/.bash_historyHISTFILESIZE, HISTCONTROL, shopt in .bashrc
Zsh$XDG_STATE_HOME/.zsh_historySAVEHIST, setopt in 0_base.zshrc

All shells: HISTSIZE=20000, set in sh.d/10_interactive.sh.

Paths

PathContents
$MISE_DATA_DIR/shimsmise shims, first on PATH ahead of Homebrew
$XDG_CACHE_HOME/shell/source_cache output; delete a file to regenerate it
$XDG_STATE_HOME/History files

Diagnostic commands

CommandPurpose
ZSH_PROFILE=1 zsh -lic exitPrint Zsh startup function timings
ENV="$XDG_CONFIG_HOME/sh/.shrc" sh -iStart a POSIX interactive shell with the shared config