mirror of
https://github.com/nvbn/thefuck.git
synced 2025-02-20 20:09:07 +00:00
Make thefuck-alias
depends on current shell
This commit is contained in:
parent
bcd3154121
commit
3ce8c1187c
@ -120,7 +120,7 @@ def run_rule(rule, command, history, settings):
|
||||
|
||||
|
||||
def alias():
|
||||
print("\nalias fuck='eval $(thefuck $(fc -ln -1))'\n")
|
||||
print(shells.app_alias())
|
||||
|
||||
|
||||
def main():
|
||||
|
@ -31,6 +31,9 @@ class Generic(object):
|
||||
"""Prepares command for running in shell."""
|
||||
return command_script
|
||||
|
||||
def app_alias(self):
|
||||
return "\nalias fuck='eval $(thefuck $(fc -ln -1))'\n"
|
||||
|
||||
|
||||
class Bash(Generic):
|
||||
def _parse_alias(self, alias):
|
||||
@ -78,3 +81,7 @@ def from_shell(command):
|
||||
|
||||
def to_shell(command):
|
||||
return _get_shell().to_shell(command)
|
||||
|
||||
|
||||
def app_alias():
|
||||
return _get_shell().app_alias()
|
||||
|
Loading…
x
Reference in New Issue
Block a user