mirror of
https://github.com/nvbn/thefuck.git
synced 2025-10-08 04:44:00 +01:00
Fixes #921
This commit is contained in:
committed by
Vladimir Iakovlev
parent
48e1e4217f
commit
e047c1eb40
@@ -22,10 +22,13 @@ def main():
|
|||||||
elif known_args.version:
|
elif known_args.version:
|
||||||
logs.version(get_installation_info().version,
|
logs.version(get_installation_info().version,
|
||||||
sys.version.split()[0], shell.info())
|
sys.version.split()[0], shell.info())
|
||||||
elif known_args.command or 'TF_HISTORY' in os.environ:
|
# It's important to check if an alias is being requested before checking if
|
||||||
fix_command(known_args)
|
# `TF_HISTORY` is in `os.environ`, otherwise it might mess with subshells.
|
||||||
|
# Check https://github.com/nvbn/thefuck/issues/921 for reference
|
||||||
elif known_args.alias:
|
elif known_args.alias:
|
||||||
print_alias(known_args)
|
print_alias(known_args)
|
||||||
|
elif known_args.command or 'TF_HISTORY' in os.environ:
|
||||||
|
fix_command(known_args)
|
||||||
elif known_args.shell_logger:
|
elif known_args.shell_logger:
|
||||||
try:
|
try:
|
||||||
from .shell_logger import shell_logger # noqa: E402
|
from .shell_logger import shell_logger # noqa: E402
|
||||||
|
Reference in New Issue
Block a user