diff --git a/modules/programs/fish.nix b/modules/programs/fish.nix index e9613539..689fc41c 100644 --- a/modules/programs/fish.nix +++ b/modules/programs/fish.nix @@ -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 diff --git a/tests/modules/programs/fish/abbrs.nix b/tests/modules/programs/fish/abbrs.nix index c026c3c2..030d65c3 100644 --- a/tests/modules/programs/fish/abbrs.nix +++ b/tests/modules/programs/fish/abbrs.nix @@ -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" '';