id = "zsh" name = "Zsh" homepage = "https://www.zsh.org" description = "A shell built for interactive use, with a scripting language to match." icon = "theSVG:zsh" executables = ["zsh"] platforms = ["macos", "linux"] [dotfiles] # Startup files are read from $ZDOTDIR, defaulting to $HOME (zsh(1), STARTUP/ # SHUTDOWN FILES). ~/.config/zsh is the conventional ZDOTDIR; both are listed # so a consumer picks up whichever exists. paths = [ "~/.zshenv", "~/.zprofile", "~/.zshrc", "~/.zlogin", "~/.zlogout", "~/.config/zsh/", ] exclude = [ "~/.zsh_history", "~/.zsh_sessions/", "~/.zcompdump*", "~/.config/zsh/.zsh_history", "~/.config/zsh/.zcompdump*", ] secret = [] # HOMEBREW_PREFIX and JAVA_HOME are decided by the kind of machine and not by # this one — /opt/homebrew on Apple Silicon, /usr/local on Intel, /usr/lib/jvm # on a Linux box — so the same OS and architecture gives the same value and it # travels with that class. [[dotfiles.machine_lines]] file = "~/.zshrc" match = { prefix = ["export HOMEBREW_PREFIX=", "export JAVA_HOME="] } scope = "platform" # PATH and NVM_DIR sit in the same file but are not that kind of value: they # carry this user's own directories, home directory included. Split off so they # are kept for rebuilding this machine instead of being handed to the next one. [[dotfiles.machine_lines]] file = "~/.zshrc" match = { prefix = ["export PATH=", "export NVM_DIR="] } scope = "backup" # Same in .zshenv: the PATH this machine builds, and the directory the user # chose to keep zsh's own files in. [[dotfiles.machine_lines]] file = "~/.zshenv" match = { prefix = ["export PATH=", "export ZDOTDIR="] } scope = "backup" [commands] format = 1 label = "Run zsh" description = "Run a command string or a script with zsh, optionally syntax-checking or tracing it. Named -o options and script arguments are left out." quality = "ai-draft" parser = { end_of_options = "--", interleave = "permute", long_equals = false, short_attached = false, short_bundles = true } [[commands.source]] id = "help" kind = "help" revision = "zsh 5.9" evidence = """ --help show this message, then exit --version show zsh version number, then exit -c take first argument as a command to execute -e equivalent to --errexit -f equivalent to --no-rcs -i equivalent to --interactive -l equivalent to --login -n equivalent to --no-exec -v equivalent to --verbose -x equivalent to --xtrace """ [[commands.field]] id = "command" label = "Command string" type = "string" option = ["-c"] sources = ["help"] [[commands.field]] id = "script" label = "Script file" type = "path" path = { kind = "file", role = "input" } position = 0 sources = ["help"] [[commands.field]] id = "syntax_only" label = "Syntax check only (do not execute)" type = "boolean" option = ["-n"] sources = ["help"] [[commands.field]] id = "xtrace" label = "Trace commands as they run" type = "boolean" option = ["-x"] sources = ["help"] [[commands.field]] id = "verbose" label = "Print input lines as read" type = "boolean" option = ["-v"] sources = ["help"] [[commands.field]] id = "errexit" label = "Exit on first error" type = "boolean" option = ["-e"] sources = ["help"] [[commands.field]] id = "no_rcs" label = "Skip startup files" type = "boolean" option = ["-f"] sources = ["help"] [[commands.field]] id = "login" label = "Login shell" type = "boolean" option = ["-l"] sources = ["help"] [[commands.field]] id = "interactive" label = "Force interactive" type = "boolean" option = ["-i"] sources = ["help"] [[commands.task]] id = "run_command" label = "Run a command string" fields = ["command", "no_rcs", "errexit", "xtrace"] required = ["command"] [[commands.task]] id = "check_script" label = "Syntax-check a script" fields = ["script", "syntax_only"] required = ["script"] set = { syntax_only = [true] } [[commands.task]] id = "trace_script" label = "Run a script with tracing" fields = ["script", "xtrace", "errexit", "no_rcs"] required = ["script"] set = { xtrace = [true] } [[commands.group]] id = "basic" label = "Basic" fields = ["command", "script", "syntax_only", "xtrace"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["verbose", "errexit", "no_rcs", "login", "interactive"]