fish: allow multiple commands for command option in abbreviations (#6851)
This commit is contained in:
parent
20705949f1
commit
b8d186abf8
2 changed files with 10 additions and 1 deletions
|
|
@ -185,7 +185,7 @@ let
|
|||
};
|
||||
|
||||
command = mkOption {
|
||||
type = with types; nullOr str;
|
||||
type = with types; nullOr (either str (listOf str));
|
||||
default = null;
|
||||
description = ''
|
||||
Specifies the command(s) for which the abbreviation should expand. If
|
||||
|
|
|
|||
|
|
@ -39,6 +39,13 @@
|
|||
command = "git";
|
||||
expansion = "checkout";
|
||||
};
|
||||
s = {
|
||||
command = [
|
||||
"git"
|
||||
"hg"
|
||||
];
|
||||
expansion = "status";
|
||||
};
|
||||
dotdot = {
|
||||
regex = "^\\.\\.+$";
|
||||
function = "multicd";
|
||||
|
|
@ -70,6 +77,8 @@
|
|||
'"
|
||||
assertFileContains home-files/.config/fish/config.fish \
|
||||
"abbr --add --command git -- co checkout"
|
||||
assertFileContains home-files/.config/fish/config.fish \
|
||||
"abbr --add --command git --command hg -- s status"
|
||||
assertFileContains home-files/.config/fish/config.fish \
|
||||
"abbr --add --function multicd --regex '^\.\.+$' -- dotdot"
|
||||
'';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue