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
|
||||
];
|
||||
text = ''
|
||||
if [ -z "''${1:-""}" ] || [ "$1" == "." ]; then
|
||||
fd '.*\.nix' . -x statix fix -- {} \;
|
||||
fd '.*\.nix' . -X deadnix -e -- {} \; -X nixfmt {} \;
|
||||
else
|
||||
statix fix -- "$1"
|
||||
deadnix -e "$1"
|
||||
nixfmt "$1"
|
||||
fi
|
||||
fd "$@" -t f -e nix -x statix fix -- '{}'
|
||||
fd "$@" -t f -e nix -X deadnix -e -- '{}' \; -X nixfmt '{}'
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue