FISH(1)
โจ NAME โจ
fish โ the friendly interactive shell ๐๐
(also, for the record, the manual name is fish-shell and this page is FISH(1) โ there, header folded in, we move ๐ธ)
๐ SYNOPSIS ๐
fish [OPTIONS] [FILE [ARG ...]]
fish [OPTIONS] [-c COMMAND [ARG ...]]
๐ฆ DESCRIPTION ๐ฆ
okay so bestie, <rainbow>fish</rainbow> is a command-line shell that was written mainly with interactive use in mind, like it literally exists to be typed into by a human ๐ซถ
this page is just the quick rundown of the options for invoking fish, ngl. the full manual is out there in HTML โ you get it with the help command from inside fish โ and it also lives in the fish-doc(1) man page. the tutorial is HTML too, via help tutorial, or you can hit man fish-tutorial ๐โจ
the following options are available (all of them, no skips, we don't do that here ๐ )
-c,--command=COMMANDโ evaluate the commands you hand it instead of reading from the commandline. any extra positional args become$argv๐ฏ-C,--init-command=COMMANDSโ evaluate these commands after it reads the config but before it runs whatever-cgave it, or before it reads interactive input. so like, your little pre-game ritual ๐ฌ-d,--debug=DEBUG_CATEGORIESโ turns on debug output and gives a pattern for matching debug categories. the Debugging section below has the tea โ-o,--debug-output=DEBUG_FILEโ names a file path that receives the debug output, including categories andfish_trace. default is standard error ๐-i,--interactiveโ the shell is interactive. that's it, that's the whole flag ๐ฌ-l,--loginโ act as if invoked as a login shell ๐ช-N,--no-configโ do not read configuration files. zero config, zero drama ๐-n,--no-executeโ don't execute anything, just do syntax checking. vibes only, no running ๐-p,--profile=PROFILE_FILEโ when fish exits, it outputs timing info on all the commands it executed to the file you name. this excludes time spent starting up and reading the configuration โฑ๏ธ--profile-startup=PROFILE_FILEโ writes the timing for fish's startup to the specified file ๐-P,--privateโ enables private mode: fish will not access old history or store new history ๐คซ๐ฅ--print-rusage-selfโ when fish exits, output stats fromgetrusage๐--print-debug-categoriesโ print all the debug categories, then exit ๐-v,--versionโ print version and exit ๐ท๏ธ-f,--features=FEATURESโ enables one or more comma-separated feature flags ๐งฉ
the fish exit status is generally the exit status of the last foreground command, iykyk โ
๐ DEBUGGING ๐
so fish gives you extensive support for debugging fish scripts, which slays โ but you can also debug and instrument its internals, which is the main-character move ๐
you turn debugging on by passing the --debug option. for example, this command turns on debugging for background IO thread events, in addition to the default categories, i.e. debug, error, warning, and warning-path:
> fish --debug=iothread
the categories that are available get listed by fish --print-debug-categories. the --debug option accepts a comma-separated list of categories and it supports glob syntax, which is honestly so good โจ the following command turns on debugging for complete, history, history-file, and profile-history, as well as the default categories:
> fish --debug='complete,*history*'
debug messages output to stderr by default. also note: if fish_trace is set, execution tracing also outputs to stderr by default. if you'd rather have it in a file, that's what the --debug-output option is for:
> fish --debug='complete,*history*' --debug-output=/tmp/fish.log --init-command='set fish_trace on'
๐ซถ real talk: these options can also be changed via theFISH_DEBUGandFISH_DEBUG_OUTPUTvariables.
the categories enabled via --debug are added to the ones enabled by $FISH_DEBUG, so you can disable them by prefixing them with - โ like, reader-*,-ast* enables reader debugging and disables ast debugging ๐ง
and the file given in --debug-output takes precedence over the file in FISH_DEBUG_OUTPUT. periodt ๐
๐ EXAMPLES ๐
to just start fish, iconic, no notes:
fish
to run a file with fish:
fish /path/to/script.fish
to run some commands with fish:
fish -c 'echo Hi there!'
you can also pass arguments to those commands ๐ซถ
> fish -c 'printf %s\n $argv' "first line" "second line"
first line
second line
to run a script, except read this other file first:
fish --init-cmd "source otherfile" script.fish
to profile fish's startup and find out what takes the most time in your configuration โ genuinely obsessed with this one:
fish --profile-startup /tmp/start.prof -ic exit
sort -nk2 /tmp/start.prof
๐ Copyright ๐
fish-shell developers ๐ธ
and that's the whole page bestie ๐ this was version 4.9, dated Sep 08, 2026 โ go forth and shell, mwah ๐๐โจ
๐ฆ where this page comes from
- arch rolling: fish 4.9.3-1 ยท GPL-2.0-only AND BSD-3-Clause AND ISC AND MIT AND PSF-2.0
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms