From 95d672534e9addc5cc69cd96903d17e89019c45b Mon Sep 17 00:00:00 2001 From: Fabian Boehm Date: Fri, 16 Dec 2022 17:10:45 +0100 Subject: [PATCH] docs: Explain how to skip abbrs --- doc_src/interactive.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc_src/interactive.rst b/doc_src/interactive.rst index 3730f30c1..73b5da89a 100644 --- a/doc_src/interactive.rst +++ b/doc_src/interactive.rst @@ -197,7 +197,7 @@ To avoid needless typing, a frequently-run command like ``git checkout`` can be abbr -a gco git checkout -After entering ``gco`` and pressing :kbd:`Space` or :kbd:`Enter`, the ``gco`` will turn into ``git checkout`` in the command line. +After entering ``gco`` and pressing :kbd:`Space` or :kbd:`Enter`, a ``gco`` in command position will turn into ``git checkout`` in the command line. If you want to use a literal ``gco`` sometimes, use :kbd:`Control`\ +\ :kbd:`Space` [#]_. This is a lot more powerful, for example you can make going up a number of directories easier with this:: @@ -210,6 +210,8 @@ Now, ``..`` transforms to ``cd ../``, while ``...`` turns into ``cd ../../`` and The advantage over aliases is that you can see the actual command before using it, add to it or change it, and the actual command will be stored in history. +.. [#] Any binding that executes the ``expand-abbr`` or ``execute`` :ref:`bind function ` will expand abbreviations. By default :kbd:`Control`\ +\ :kbd:`Space` is bound to just inserting a space. + .. _title: Programmable title