mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-25 12:23:09 +00:00
Soften abbr-in-config.fish wording
This isn't as necessary anymore and having abbrs in config.fish is nice for e.g. storing it in git.
This commit is contained in:
parent
eb0d18add4
commit
00cd01c89e
1 changed files with 1 additions and 9 deletions
|
@ -14,15 +14,7 @@ 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 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
|
||||
Abbreviations are stored using universal variables. You can create abbreviations directly on the command line, and they will be saved automatically. Calling `abbr -a` in config.fish will lead to slightly worse startup performance.
|
||||
|
||||
The following parameters are available:
|
||||
|
||||
|
|
Loading…
Reference in a new issue