From cbf28dfa5798e551bea2385259c1d71ebc48f3a6 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Fri, 22 Oct 2021 17:08:41 +0200 Subject: [PATCH] Document turning off suggestions/history Also add more mentions of `fish_config` in general. --- doc_src/interactive.rst | 13 +++++++++++++ doc_src/language.rst | 2 ++ doc_src/tutorial.rst | 13 +++++++++++++ 3 files changed, 28 insertions(+) diff --git a/doc_src/interactive.rst b/doc_src/interactive.rst index 281bf47ec..e524634b9 100644 --- a/doc_src/interactive.rst +++ b/doc_src/interactive.rst @@ -29,6 +29,9 @@ To accept the autosuggestion (replacing the command line contents), press :kbd:` Autosuggestions are a powerful way to quickly summon frequently entered commands, by typing the first few characters. They are also an efficient technique for navigating through directory hierarchies. +If you don't like autosuggestions, you can disable them by setting ``$fish_autosuggestion_enabled`` to 0:: + + set -g fish_autosuggestion_enabled 0 .. _tab-completion: @@ -81,6 +84,16 @@ Detected errors include: To customize the syntax highlighting, you can set the environment variables listed in the :ref:`Variables for changing highlighting colors ` section. +Fish also provides pre-made color themes you can pick with :ref:`fish_config `. Running just ``fish_config`` opens a browser interface, or you can use ``fish_config theme`` in the terminal. + +For example, to disable nearly all coloring:: + + fish_config theme choose none + +Or, to see all themes, right in your terminal:: + + fish_config theme show + .. _variables-color: Syntax highlighting variables diff --git a/doc_src/language.rst b/doc_src/language.rst index abfe82e52..f37dd1414 100644 --- a/doc_src/language.rst +++ b/doc_src/language.rst @@ -1268,6 +1268,8 @@ You can change the settings of fish by changing the values of certain variables. - ``fish_emoji_width`` controls whether fish assumes emoji render as 2 cells or 1 cell wide. This is necessary because the correct value changed from 1 to 2 in Unicode 9, and some terminals may not be aware. Set this if you see graphical glitching related to emoji (or other "special" characters). It should usually be auto-detected. +- ``fish_autosuggestion_enabled`` controls if :ref:`autosuggestions` are enabled. Set it to 0 to disable, anything else to enable. By default they are on. + - ``fish_handle_reflow``, determines whether fish should try to repaint the commandline when the terminal resizes. In terminals that reflow text this should be disabled. Set it to 1 to enable, anything else to disable. - ``fish_key_bindings``, the name of the function that sets up the keyboard shortcuts for the :ref:`command-line editor `. diff --git a/doc_src/tutorial.rst b/doc_src/tutorial.rst index 0906a8cfc..f66c6ccac 100644 --- a/doc_src/tutorial.rst +++ b/doc_src/tutorial.rst @@ -112,6 +112,15 @@ This tells you that there exists a file that starts with ``somefi``, which is us These colors, and many more, can be changed by running ``fish_config``, or by modifying :ref:`color variables ` directly. +For example, if you want to disable (almost) all coloring:: + + fish_config theme choose none + +This picks the "none" theme. To see all themes:: + + fish_config theme show + +Just running ``fish_config`` will open up a browser interface that allows you to pick from the available themes. Wildcards --------- @@ -195,6 +204,10 @@ And history too. Type a command once, and you can re-summon it by just typing a To accept the autosuggestion, hit :kbd:`→` (right arrow) or :kbd:`Control`\ +\ :kbd:`F`. To accept a single word of the autosuggestion, :kbd:`Alt`\ +\ :kbd:`→` (right arrow). If the autosuggestion is not what you want, just ignore it. +If you don't like autosuggestions, you can disable them by setting ``$fish_autosuggestion_enabled`` to 0:: + + set -g fish_autosuggestion_enabled 0 + Tab Completions ---------------