diff --git a/doc_src/cmds/fish_command_not_found.rst b/doc_src/cmds/fish_command_not_found.rst index cb1d90dfb..cdc0b6fa7 100644 --- a/doc_src/cmds/fish_command_not_found.rst +++ b/doc_src/cmds/fish_command_not_found.rst @@ -1,4 +1,4 @@ -.. _cmd-fish_cmd_not_found: +.. _cmd-fish_command_not_found: fish_command_not_found - what to do when a command wasn't found =============================================================== diff --git a/doc_src/commands.rst b/doc_src/commands.rst index a72192cb5..8f3191543 100644 --- a/doc_src/commands.rst +++ b/doc_src/commands.rst @@ -3,7 +3,90 @@ Commands ============ -fish ships with the following commands: +This is a list of all the commands fish ships with. + +Broadly speaking, these fall into a few categories: + +Keywords +^^^^^^^^ + +Core language keywords that make up the syntax, like + +- :ref:`if ` for conditions. +- :ref:`for ` and :ref:`while ` for loops. +- :ref:`break ` and :ref:`continue ` to control loops. +- :ref:`function ` to define functions. +- :ref:`return ` to return a status from a function. +- :ref:`begin ` to begin a block and :ref:`end ` to end any block (including ifs and loops). +- :ref:`and `, :ref:`or ` and :ref:`not ` to combine commands logically. +- :ref:`switch ` and :ref:`case ` to make multiple blocks depending on the value of a variable. + +Decorations +^^^^^^^^^^^ + +Command decorations are keywords like :ref:`command ` or :ref:`builtin ` to tell fish what sort of thing to execute, and :ref:`time ` to time its execution. :ref:`exec ` tells fish to replace itself with the command. + +Tools to do a task +^^^^^^^^^^^^^^^^^^ + +Builtins to do a task, like + +- :ref:`cd ` to change the current directory. +- :ref:`echo ` or :ref:`printf ` to produce output. +- :ref:`set ` to set, query or erase variables. +- :ref:`read ` to read input. +- :ref:`string ` for string manipulation. +- :ref:`math ` does arithmetic. +- :ref:`argparse ` to make arguments easier to handle. +- :ref:`count ` to count arguments. +- :ref:`type ` to find out what sort of thing (command, builtin or function) fish would call, or if it exists at all. +- :ref:`test ` checks conditions like if a file exists or a string is empty. +- :ref:`contains ` to see if a list contains an entry. +- :ref:`abbr ` manages :ref:`abbreviations`. +- :ref:`eval ` and :ref:`source ` to run fish code from a string or file. +- :ref:`set_color ` to colorize your output. +- :ref:`status ` to get shell information, like whether it's interactive or a login shell, or which file it is currently running. +- :ref:`bind ` to change bindings. +- :ref:`commandline ` to get or change the commandline contents. +- :ref:`fish_config ` to easily change fish's configuration, like the prompt or colorscheme. +- :ref:`random ` to generate random numbers or pick from a list. + +Known functions +^^^^^^^^^^^^^^^^ + +Known functions are a customization point. You can change them to change how your fish behaves. This includes: + +- :ref:`fish_prompt ` and :ref:`fish_right_prompt ` and :ref:`fish_mode_prompt ` to print your prompt. +- :ref:`fish_command_not_found ` to tell fish what to do when a command is not found. +- :ref:`fish_title ` to change the terminal's title. +- :ref:`fish_greeting ` to show a greeting when fish starts. + +Helper functions +^^^^^^^^^^^^^^^^ + +Some helper functions, often to give you information for use in your prompt: + +- :ref:`fish_git_prompt ` and :ref:`fish_hg_prompt ` to print information about the current git or mercurial repository. +- :ref:`fish_vcs_prompt ` to print information for either. +- :ref:`fish_svn_prompt ` to print information about the current svn repository. +- :ref:`fish_status_to_signal ` to give a signal name from a return status. +- :ref:`prompt_pwd ` to give the current directory in a nicely formatted and shortened way. +- :ref:`prompt_login ` to describe the current login, with user and hostname, and to explain if you are in a chroot or connected via ssh. +- :ref:`fish_is_root_user ` to check if the current user is an administrator user like root. +- :ref:`fish_add_path ` to easily add a path to $PATH. +- :ref:`alias ` to quickly define wrapper functions ("aliases"). + +Helper commands +^^^^^^^^^^^^^^^ + +fish also ships some things as external commands so they can be easily called from elsewhere. + +This includes :ref:`fish_indent ` to format fish code and :ref:`fish_key_reader ` to show you what escape sequence a keypress produces. + +The full list +^^^^^^^^^^^^^ + +And here is the full list: .. toctree:: :glob: