mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
better fd command for formatting
This commit is contained in:
parent
827928018a
commit
94c8616ea4
1 changed files with 2 additions and 8 deletions
|
|
@ -14,13 +14,7 @@ writeShellApplication {
|
||||||
fd
|
fd
|
||||||
];
|
];
|
||||||
text = ''
|
text = ''
|
||||||
if [ -z "''${1:-""}" ] || [ "$1" == "." ]; then
|
fd "$@" -t f -e nix -x statix fix -- '{}'
|
||||||
fd '.*\.nix' . -x statix fix -- {} \;
|
fd "$@" -t f -e nix -X deadnix -e -- '{}' \; -X nixfmt '{}'
|
||||||
fd '.*\.nix' . -X deadnix -e -- {} \; -X nixfmt {} \;
|
|
||||||
else
|
|
||||||
statix fix -- "$1"
|
|
||||||
deadnix -e "$1"
|
|
||||||
nixfmt "$1"
|
|
||||||
fi
|
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue