mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-29 18:51:15 -03:00
docs: Don't speak of "initialization files"
The file is called "config.fish", not "init.fish". We'll call it "configuration" now. "Initialization" might be slightly more precise, but in an irritating way. Also some wording improvements to the section. In particular we now mention config.fish *early*, before the whole shebang.
This commit is contained in:
@@ -39,7 +39,7 @@ Note that special input functions cannot be combined with ordinary shell script
|
||||
|
||||
If no ``SEQUENCE`` is provided, all bindings (or just the bindings in the given ``MODE``) are printed. If ``SEQUENCE`` is provided but no ``COMMAND``, just the binding matching that sequence is printed.
|
||||
|
||||
To save custom keybindings, put the ``bind`` statements into :ref:`config.fish <initialization>`. Alternatively, fish also automatically executes a function called ``fish_user_key_bindings`` if it exists.
|
||||
To save custom keybindings, put the ``bind`` statements into :ref:`config.fish <configuration>`. Alternatively, fish also automatically executes a function called ``fish_user_key_bindings`` if it exists.
|
||||
|
||||
Key bindings may use "modes", which mimics Vi's modal input behavior. The default mode is "default", and every bind applies to a single mode. The mode can be viewed/changed with the ``$fish_bind_mode`` variable.
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ Example
|
||||
|
||||
``fish_config prompt show`` demos the available sample prompts.
|
||||
|
||||
``fish_config prompt choose disco`` makes the disco prompt the prompt for the current session. This can also be used in :ref:`config.fish <initialization>` to set the prompt.
|
||||
``fish_config prompt choose disco`` makes the disco prompt the prompt for the current session. This can also be used in :ref:`config.fish <configuration>` to set the prompt.
|
||||
|
||||
``fish_config prompt save`` saves the current prompt to an :ref:`autoloaded <syntax-function-autoloading>` file.
|
||||
|
||||
|
||||
@@ -17,6 +17,6 @@ Description
|
||||
|
||||
``funcsave`` saves a function to a file in the fish configuration directory. This function will be :ref:`automatically loaded <syntax-function-autoloading>` by current and future fish sessions. This can be useful if you have interactively created a new function and wish to save it for later use.
|
||||
|
||||
Note that because fish loads functions on-demand, saved functions will not function as :ref:`event handlers <event>` until they are run or sourced otherwise. To activate an event handler for every new shell, add the function to your :ref:`shell initialization file <initialization>` instead of using ``funcsave``.
|
||||
Note that because fish loads functions on-demand, saved functions will not function as :ref:`event handlers <event>` until they are run or sourced otherwise. To activate an event handler for every new shell, add the function to your :ref:`configuration file <configuration>` instead of using ``funcsave``.
|
||||
|
||||
This is typically used together with :ref:`funced <cmd-funced>`, which will open the function in your editor and load it in the current seession afterwards.
|
||||
|
||||
Reference in New Issue
Block a user