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 leavefish_command_not_foundundefined (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. π§
π Copyright π
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