id = "fish" name = "fish" homepage = "https://fishshell.com" description = "A command line shell that favours discoverability: autosuggestions and highlighting out of the box." icon = "SimpleIcons:fishshell" executables = ["fish"] platforms = ["macos", "linux"] [dotfiles] # fish reads $XDG_CONFIG_HOME/fish, defaulting to ~/.config/fish on macOS as # well as Linux — the [configHome] base directory # (https://fishshell.com/docs/current/language.html#configuration-files). paths = [ "[configHome]/fish/config.fish", "[configHome]/fish/conf.d/", "[configHome]/fish/functions/", "[configHome]/fish/completions/", "[configHome]/fish/fish_plugins", "[configHome]/fish/themes/", ] # fish_variables holds universal variables, which fish rewrites at runtime; # it is machine state, not configuration. # fish's data directory is $XDG_DATA_HOME, else ~/.local/share, on macOS as well # as Linux, so it is [xdgData]; [dataHome] would be # ~/Library/Application Support, which fish never writes. fish reads the # variable rather than hard-coding the default — `fish -c 'echo # $__fish_user_data_dir'` on macOS answers $XDG_DATA_HOME/fish when it is set # and ~/.local/share/fish when it is not. exclude = [ "[configHome]/fish/fish_variables", "[configHome]/fish/fish_history", "[xdgData]/fish/", ] secret = [] # Both lines are built out of this user's own home directory, so no second # machine can take them as they stand — but they are also this user's shell, # the thing they would rebuild first, so they are kept: backup. [[dotfiles.machine_lines]] file = "[configHome]/fish/config.fish" match = { prefix = ["set -gx PATH", "fish_add_path"] } scope = "backup" # JAVA_HOME is split out of the rule above because it is a different kind of # value: /opt/homebrew/opt/openjdk on Apple Silicon, /usr/local on Intel, # /usr/lib/jvm on a distro — the same on every machine of that class whoever is # logged in. Decided by the platform, so it travels to one of the same kind. [[dotfiles.machine_lines]] file = "[configHome]/fish/config.fish" match = { prefix = ["set -gx JAVA_HOME"] } scope = "platform" [commands] format = 1 label = "Start fish" description = "Start fish interactively, run a command or script, or syntax-check a script. Debug and feature flags are left out." quality = "ai-draft" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = true } [[commands.source]] id = "help" kind = "manual" url = "https://fishshell.com/docs/current/cmds/fish.html" revision = "4.6.0" evidence = """ -c or --command=COMMAND Evaluate the specified commands instead of reading from the commandline. -C or --init-command=COMMANDS Evaluate specified commands after reading the configuration -i or --interactive The shell is interactive. -l or --login Act as if invoked as a login shell. -N or --no-config Do not read configuration files. -n or --no-execute Do not execute any commands, only perform syntax checking. -P or --private Enables private mode: fish will not access old or store new history. fish [OPTIONS] [FILE [ARG ...]] """ [[commands.field]] id = "command" label = "Command to run" type = "string" option = ["--command", "-c"] sources = ["help"] [[commands.field]] id = "init_command" label = "Init command" type = "string" option = ["--init-command", "-C"] sources = ["help"] [[commands.field]] id = "interactive" label = "Interactive" type = "boolean" option = ["--interactive", "-i"] sources = ["help"] [[commands.field]] id = "login" label = "Login shell" type = "boolean" option = ["--login", "-l"] sources = ["help"] [[commands.field]] id = "no_config" label = "Skip config files" type = "boolean" option = ["--no-config", "-N"] sources = ["help"] [[commands.field]] id = "no_execute" label = "Syntax check only" type = "boolean" option = ["--no-execute", "-n"] sources = ["help"] [[commands.field]] id = "private" label = "Private mode (no history)" type = "boolean" option = ["--private", "-P"] sources = ["help"] [[commands.field]] id = "script" label = "Script file" type = "path" position = 0 path = { kind = "file", role = "input" } sources = ["help"] [[commands.task]] id = "run_script" label = "Run a script" fields = ["script"] required = ["script"] [[commands.task]] id = "check" label = "Syntax-check a script" fields = ["script"] required = ["script"] set = { no_execute = [true] } [[commands.task]] id = "private" label = "Private session" fields = [] set = { private = [true] } [[commands.group]] id = "basic" label = "Basic" fields = ["script", "command", "no_execute", "private"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["init_command", "interactive", "login", "no_config"]