mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-09 12:11:20 -03:00
Add the possibility to rename abbreviations
The abbr function doesn't have the possiblity to rename abbreviations. You have to delete the old one and create a new one. This commit adds this functionality and uses the syntax: abbr -r OLD_KEY NEW_KEY Fixes #2155.
This commit is contained in:
committed by
Kurtis Rader
parent
a0d9db94cb
commit
1fbcb1ee9d
@@ -3,6 +3,7 @@
|
||||
\subsection abbr-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
abbr --add word phrase...
|
||||
abbr --rename word new_word
|
||||
abbr --show
|
||||
abbr --list
|
||||
abbr --erase word
|
||||
@@ -33,6 +34,8 @@ The following parameters are available:
|
||||
|
||||
- `-a WORD PHRASE` or `--add WORD PHRASE` Adds a new abbreviation, causing WORD to be expanded to PHRASE.
|
||||
|
||||
- `-r WORD NEW_WORD` or `--rename WORD NEW_WORD` Renames an abbreviation, from WORD to NEW_WORD.
|
||||
|
||||
- `-s` or `--show` Show all abbreviated words and their expanded phrases in a manner suitable for export and import.
|
||||
|
||||
- `-l` or `--list` Lists all abbreviated words.
|
||||
@@ -48,6 +51,11 @@ abbr -a gco git checkout
|
||||
\endfish
|
||||
Add a new abbreviation where `gco` will be replaced with `git checkout`.
|
||||
|
||||
\fish
|
||||
abbr -r gco gch
|
||||
\endfish
|
||||
Renames an existing abbreviation from `gco` to `gch`.
|
||||
|
||||
\fish
|
||||
abbr -e gco
|
||||
\endfish
|
||||
|
||||
Reference in New Issue
Block a user