From 886b4b92b2914039bed5179c5e49bf99bf36ba28 Mon Sep 17 00:00:00 2001 From: Fabian Boehm Date: Tue, 13 Dec 2022 18:32:56 +0100 Subject: [PATCH] docs/abbr: Explain ctrl-space This is now more important because we have regexes and global abbrs --- doc_src/cmds/abbr.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc_src/cmds/abbr.rst b/doc_src/cmds/abbr.rst index f4bd79778..28eea2130 100644 --- a/doc_src/cmds/abbr.rst +++ b/doc_src/cmds/abbr.rst @@ -27,6 +27,7 @@ Description For example, a frequently-run command like ``git checkout`` can be abbreviated to ``gco``. After entering ``gco`` and pressing :kbd:`Space` or :kbd:`Enter`, the full text ``git checkout`` will appear in the command line. +To avoid expanding something that looks like an abbreviation, the default :kbd:`Control`\ +\ :kbd:`Space` binding inserts a space without expanding. An abbreviation may match a literal word, or it may match a pattern given by a regular expression. When an abbreviation matches a word, that word is replaced by new text, called its *expansion*. This expansion may be a fixed new phrase, or it can be dynamically created via a fish function. This expansion occurs after pressing space or enter.