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 -c gave 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 and fish_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 from getrusage ๐Ÿ“Š
  • --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 the FISH_DEBUG and FISH_DEBUG_OUTPUT variables.

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

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