mirror of
https://github.com/nvbn/thefuck.git
synced 2025-03-14 06:38:32 +00:00
Add devenv submodule
This commit is contained in:
parent
fec207483d
commit
0aaf827d2d
19
thefuck/specific/devenv.py
Normal file
19
thefuck/specific/devenv.py
Normal file
@ -0,0 +1,19 @@
|
||||
from thefuck.utils import which
|
||||
from subprocess import Popen, PIPE
|
||||
|
||||
|
||||
env_available = bool(which('pyenv')) or bool(which('rbenv')) or bool(which('goenv')) or bool(which('nodenv'))
|
||||
|
||||
|
||||
COMMON_TYPOS = {
|
||||
'list': ['versions', 'install --list'],
|
||||
'remove': ['uninstall'],
|
||||
}
|
||||
|
||||
|
||||
def get_commands(command):
|
||||
if 'env' in command.script_parts[0]:
|
||||
proc = Popen([str(command.script_parts[0]), 'commands'], stdout=PIPE)
|
||||
else:
|
||||
proc = Popen([str(command.script_parts[1]), 'commands'], stdout=PIPE)
|
||||
return [line.decode('utf-8').strip() for line in proc.stdout.readlines()]
|
Loading…
x
Reference in New Issue
Block a user