fish: added abbr.name option
This commit is contained in:
parent
3670a78eee
commit
7538d96535
2 changed files with 19 additions and 2 deletions
|
|
@ -166,6 +166,14 @@ let
|
|||
|
||||
abbrModule = types.submodule {
|
||||
options = {
|
||||
name = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
description = ''
|
||||
The abbreviation name that is replaced by the expansion.
|
||||
'';
|
||||
};
|
||||
|
||||
expansion = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
|
|
@ -289,8 +297,9 @@ let
|
|||
|
||||
abbrsStr = lib.concatStringsSep "\n" (
|
||||
lib.mapAttrsToList (
|
||||
name: def:
|
||||
attrName: def:
|
||||
let
|
||||
name = if isAttrs def && def.name != null then def.name else attrName;
|
||||
mods =
|
||||
lib.cli.toGNUCommandLineShell
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue