FISH_COMMAND_NOT_FOUND(1)

πŸ¦‹ FISH_COMMAND_NOT_FOUND β€” the manual page, bestie edition ✨

ok so this is the fish-shell manual for fish_command_not_found, and honestly? it's giving "the unsung hero of your terminal" energy. let's get into it πŸ’…


✨ NAME ✨

fish_command_not_found β€” literally what to do when a command wasn't found 🫢


πŸŽ€ SYNOPSIS πŸŽ€

function fish_command_not_found
   ...
end

πŸ’– DESCRIPTION πŸ’–

okay so picture this: fish tries to execute a command, and it's just… not there. no cap, it cannot find it. and when that happens, fish invokes this function. that's the whole vibe check. πŸ‘‘

what does it do with that moment of crisis? it can print a message to tell you about it, and it often also checks for a missing package that would include the command. like "bestie you don't have this yet, here's the package that has it" β€” helpful queen behavior. 🌸

fish ships multiple handlers for various operating systems and chooses from them when this function is loaded, or you can define your own. your terminal, your rules. πŸ’…

the important detail (iykyk): it receives the full commandline as one argument per token, so $argv[1] contains the missing command. that's the main character of this whole function, fr fr.

heads up bestie 🫢 β€” when you leave fish_command_not_found undefined (like, e.g. by adding an empty function file) or explicitly call __fish_default_command_not_found_handler, fish will just print a simple error. no fancy package detection, no cute message. just a plain error. lowkey sad but that's the deal. 😭

🌈 EXAMPLE 🌈

a simple handler πŸ“

function fish_command_not_found
    echo Did not find command $argv[1]
end

> flounder
Did not find command flounder

look at her go. iconic. ✨

the handler for OpenSUSE's command-not-found πŸ”₯

function fish_command_not_found
    /usr/bin/command-not-found $argv[1]
end

or the simple default handler πŸ’œ

function fish_command_not_found
    __fish_default_command_not_found_handler $argv
end

pick your fighter, they all slay in their own way. 🧚


fish-shell developers


aaaand that's the page, bestie! πŸ’– this one comes to you from fish-shell, version 4.9, dated Sep 08, 2026 β€” go forth and never be confused by a missing command again. 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