committed by
Vladimir Iakovlev
parent
59dc6cbf90
commit
48e1e4217f
@@ -0,0 +1,15 @@
|
||||
import re
|
||||
from thefuck.specific.nix import nix_available
|
||||
from thefuck.shells import shell
|
||||
|
||||
regex = re.compile(r'nix-env -iA ([^\s]*)')
|
||||
enabled_by_default = nix_available
|
||||
|
||||
|
||||
def match(command):
|
||||
return regex.findall(command.output)
|
||||
|
||||
|
||||
def get_new_command(command):
|
||||
name = regex.findall(command.output)[0]
|
||||
return shell.and_('nix-env -iA {}'.format(name), command.script)
|
||||
@@ -0,0 +1,3 @@
|
||||
from thefuck.utils import which
|
||||
|
||||
nix_available = bool(which('nix'))
|
||||
Reference in New Issue
Block a user