mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-22 04:34:25 +01:00
Exempt aliases.nix from auto formatting
This commit is contained in:
parent
229ee345f8
commit
b2cad2defa
2 changed files with 7 additions and 51 deletions
|
|
@ -6,4 +6,5 @@
|
||||||
prettier.enable = true;
|
prettier.enable = true;
|
||||||
just.enable = true;
|
just.enable = true;
|
||||||
};
|
};
|
||||||
|
settings.formatter.nixfmt.excludes = [ "modules/home/shell/aliases.nix" ];
|
||||||
}).config.build
|
}).config.build
|
||||||
|
|
|
||||||
|
|
@ -15,54 +15,9 @@
|
||||||
let
|
let
|
||||||
lsAliases =
|
lsAliases =
|
||||||
let
|
let
|
||||||
aliasList =
|
aliasList = lib.mapCartesianProduct ({ a, b, c }: a + b + c) { a = ["ll" "lt" "l"]; b = ["" "a"]; c = ["" "d" "f"]; };
|
||||||
lib.mapCartesianProduct
|
eza = "eza --header --group --time-style=long-iso --group-directories-first --sort=name --icons=auto --git --git-repos-no-status --binary ";
|
||||||
(
|
convertAliasToCmd = str: eza + (builtins.replaceStrings ["ll" "lt" "l" "a" "d" "f"] ["--long " "--tree " "--oneline --dereference " "--all " "--only-dirs " "--only-files "] str);
|
||||||
{
|
|
||||||
a,
|
|
||||||
b,
|
|
||||||
c,
|
|
||||||
}:
|
|
||||||
a + b + c
|
|
||||||
)
|
|
||||||
{
|
|
||||||
a = [
|
|
||||||
"ll"
|
|
||||||
"lt"
|
|
||||||
"l"
|
|
||||||
];
|
|
||||||
b = [
|
|
||||||
""
|
|
||||||
"a"
|
|
||||||
];
|
|
||||||
c = [
|
|
||||||
""
|
|
||||||
"d"
|
|
||||||
"f"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
convertAliasToCmd =
|
|
||||||
str:
|
|
||||||
"eza --header --group --time-style=long-iso --group-directories-first --sort=name --icons=auto --git --git-repos-no-status --binary "
|
|
||||||
+ (builtins.replaceStrings
|
|
||||||
[
|
|
||||||
"ll"
|
|
||||||
"lt"
|
|
||||||
"l"
|
|
||||||
"a"
|
|
||||||
"d"
|
|
||||||
"f"
|
|
||||||
]
|
|
||||||
[
|
|
||||||
"--long "
|
|
||||||
"--tree "
|
|
||||||
"--oneline --dereference "
|
|
||||||
"--all "
|
|
||||||
"--only-dirs "
|
|
||||||
"--only-files "
|
|
||||||
]
|
|
||||||
str
|
|
||||||
);
|
|
||||||
in
|
in
|
||||||
(lib.genAttrs aliasList convertAliasToCmd) // { ls = "l"; };
|
(lib.genAttrs aliasList convertAliasToCmd) // { ls = "l"; };
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue