forked from nvbn/thefuck
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
74f3244
commit 16d838b
Showing
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from thefuck.specific.nix import nix_available | ||
import subprocess | ||
|
||
enabled_by_default = nix_available | ||
|
||
# Set the priority just ahead of `fix_file` rule, which can generate low quality matches due | ||
# to the sheer amount of paths in the nix store. | ||
priority = 999 | ||
|
||
|
||
def match(command): | ||
return ( | ||
"NIXPKGS_ALLOW_UNFREE=1" in command.output | ||
) | ||
|
||
|
||
def get_new_command(command): | ||
commands = [ | ||
'NIXPKGS_ALLOW_UNFREE=1 {}'.format(command.script) | ||
] | ||
return commands |