aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc_src
diff options
context:
space:
mode:
authorGravatar Fabian Homborg <FHomborg@gmail.com>2016-01-16 14:49:57 +0100
committerGravatar Fabian Homborg <FHomborg@gmail.com>2016-01-24 14:32:43 +0100
commit8081e9f18900fd25436831f90f70dd3fd0c04523 (patch)
tree53748dbc08b72ad676edf86d0b8b98d5002fcedf /doc_src
parentc7ba446c23885a6cd314f862e861019ecaf244b7 (diff)
Document that abbrs should be added once
While abbrs are still stored in a universal variable, it's much quicker to just add them once and not just put `abbr --add key value` in config.fish.
Diffstat (limited to 'doc_src')
-rw-r--r--doc_src/abbr.txt10
1 files changed, 9 insertions, 1 deletions
diff --git a/doc_src/abbr.txt b/doc_src/abbr.txt
index a32592d8..799e5003 100644
--- a/doc_src/abbr.txt
+++ b/doc_src/abbr.txt
@@ -14,7 +14,15 @@ abbr -e word
Abbreviations are user-defined character sequences or words that are replaced with longer phrases after they are entered. For example, a frequently-run command such as `git checkout` can be abbreviated to `gco`. After entering `gco` and pressing @key{Space} or @key{Enter}, the full text `git checkout` will appear in the command line.
-Abbreviations are stored, by default, in a universal variable.
+Abbreviations are stored using universal variables. You can create abbreviations directly on the command line, and they will be saved automatically. Do not place them in config.fish, because this will lead to worse startup performance. Alternatively, guard the assignment with another universal variable, like:
+
+\fish
+if not set -q my_fish_abbreviations
+ abbr gco='git checkout'
+ abbr abr='another abbreviation expansion'
+ set -U my_fish_abbreviations 1
+end
+\endfish
The following parameters are available: