-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Closed
Labels
Description
The output of thefuck --version (something like The Fuck 3.1 using Python 3.5.0):
The Fuck 3.25 using Python 3.6.4+
Your shell and its version (bash, zsh, Windows PowerShell, etc.):
GNU bash, version 4.4.18(1)-release (x86_64-pc-linux-gnu)
Your system (Debian 7, ArchLinux, Windows, etc.):
Ubuntu 18.04, Bionic Beaver
How to reproduce the bug:
Execute any bad command (I tested with `cd..` and `apt install whatever`. Then enter `fuck`.
The output of The Fuck with THEFUCK_DEBUG=true exported (typically execute export THEFUCK_DEBUG=true in your shell before The Fuck):
DEBUG: Run with settings: {'alter_history': True,
'debug': True,
'env': {'GIT_TRACE': '1', 'LANG': 'C', 'LC_ALL': 'C'},
'exclude_rules': [],
'history_limit': None,
'instant_mode': False,
'no_colors': False,
'priority': {},
'repeat': False,
'require_confirmation': True,
'rules': [<const: All rules enabled>],
'slow_commands': ['lein', 'react-native', 'gradle', './gradlew', 'vagrant'],
'user_dir': PosixPath('/home/thomasokeeffe/.config/thefuck'),
'wait_command': 3,
'wait_slow_command': 15}
DEBUG: Received output:
DEBUG: Call: export THEFUCK_DEBUG=true; with env: {'CLUTTER_IM_MODULE': 'xim', 'LS_COLORS': 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:', 'LESSCLOSE': '/usr/bin/lesspipe %s %s', 'XDG_MENU_PREFIX': 'gnome-', 'LANG': 'C', 'GDM_LANG': 'en_US', 'MANAGERPID': '1425', 'DISPLAY': ':0', 'INVOCATION_ID': '09b52cf5b26f4acf8d4fcf48e96663bb', 'UNITY_DEFAULT_PROFILE': 'unity', 'COMPIZ_CONFIG_PROFILE': 'ubuntu', 'GTK2_MODULES': 'overlay-scrollbar', 'DOOMWADDIR': '/opt/doom', 'GTK_CSD': '0', 'COLORTERM': 'truecolor', 'TF_SHELL_ALIASES': 'alias alert=\'notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e \'\\\'\'s/^\\s*[0-9]\\+\\s*//;s/[;&|]\\s*alert$//\'\\\'\')"\'\nalias dfhack=\'~/df_linux/dfhack\'\nalias dwarff=\'/home/thomasokeeffe/df_linux/df\'\nalias egrep=\'egrep --color=auto\'\nalias fgrep=\'fgrep --color=auto\'\nalias grep=\'grep --color=auto\'\nalias l=\'ls -CF\'\nalias la=\'ls -A\'\nalias ll=\'ls -alF\'\nalias ls=\'ls --color=auto\'\nalias pip=\'pip3\'\nalias python=\'python3\'', 'JAVA_HOME': '/usr/lib/jvm/java-8-oracle/', 'J2SDKDIR': '/usr/lib/jvm/java-9-oracle', 'PYTHONIOENCODING': 'utf-8', 'SSH_AUTH_SOCK': '/run/user/1000/keyring/ssh', 'MANDATORY_PATH': '/usr/share/gconf/unity.mandatory.path', 'XDG_GREETER_DATA_DIR': '/var/lib/lightdm-data/thomasokeeffe', 'DERBY_HOME': '/usr/lib/jvm/java-9-oracle/db', 'USER': 'thomasokeeffe', 'DESKTOP_SESSION': 'unity', 'QT4_IM_MODULE': 'xim', 'TEXTDOMAINDIR': '/usr/share/locale/', 'DEFAULTS_PATH': '/usr/share/gconf/unity.default.path', 'PWD': '/home/thomasokeeffe', 'HOME': '/home/thomasokeeffe', 'JOURNAL_STREAM': '9:28556', 'TEXTDOMAIN': 'im-config', 'J2REDIR': '/usr/lib/jvm/java-9-oracle', 'QT_ACCESSIBILITY': '1', 'XDG_SESSION_TYPE': 'x11', 'COMPIZ_BIN_PATH': '/usr/bin/', 'XDG_DATA_DIRS': '/usr/share/unity:/usr/share/unity:/usr/local/share:/usr/share:/var/lib/snapd/desktop:/var/lib/snapd/desktop', 'XDG_SESSION_DESKTOP': 'unity', 'WINEDEBUG': '-all', 'SSH_AGENT_LAUNCHER': 'gnome-keyring', 'GTK_MODULES': 'gail:atk-bridge:unity-gtk-module', 'GNOME_SESSION_XDG_SESSION_PATH': '/org/freedesktop/DisplayManager/Session0', 'TERM': 'xterm-256color', 'VTE_VERSION': '5002', 'SHELL': '/bin/bash', 'XDG_SEAT_PATH': '/org/freedesktop/DisplayManager/Seat0', 'QT_IM_MODULE': 'ibus', 'XMODIFIERS': '@im=ibus', 'IM_CONFIG_PHASE': '2', 'XDG_CURRENT_DESKTOP': 'Unity:Unity7:ubuntu', 'GPG_AGENT_INFO': '/home/thomasokeeffe/.gnupg/S.gpg-agent:0:1:', 'TF_ALIAS': 'fuck', 'UNITY_HAS_3D_SUPPORT': 'true', 'SHLVL': '2', 'LANGUAGE': 'en_US', 'WINDOWID': '67108870', 'GDMSESSION': 'unity', 'GNOME_DESKTOP_SESSION_ID': 'this-is-deprecated', 'LOGNAME': 'thomasokeeffe', 'DBUS_SESSION_BUS_ADDRESS': 'unix:path=/run/user/1000/bus', 'XDG_RUNTIME_DIR': '/run/user/1000', 'XAUTHORITY': '/home/thomasokeeffe/.Xauthority', 'TF_HISTORY': '\t python\n\t fuck\n\t source ~/.bashrc\n\t fuck\n\t apt install whatever\n\t fuck\n\t cd..\n\t fuck\n\t fuck --version\n\t export THEFUCK_DEBUG=true', 'XDG_SESSION_PATH': '/org/freedesktop/DisplayManager/Session0', 'XDG_CONFIG_DIRS': '/etc/xdg/xdg-unity:/etc/xdg/xdg-unity:/etc/xdg', 'PATH': '/usr/bin/ski:/home/thomasokeeffe/.local/bin:/opt/doom:/usr/bin/python3:/usr/bin/ski:/home/thomasokeeffe/.local/bin:/opt/doom:/usr/bin/python3:/home/thomasokeeffe/.local/share/umake/bin:/home/thomasokeeffe/bin:/home/thomasokeeffe/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-9-oracle/bin:/usr/lib/jvm/java-9-oracle/db/bin', 'THEFUCK_DEBUG': 'true', 'LD_PRELOAD': 'libgtk3-nocsd.so.0', 'SESSION_MANAGER': 'local/Wirecat:@/tmp/.ICE-unix/1738,unix/Wirecat:/tmp/.ICE-unix/1738', 'LESSOPEN': '| /usr/bin/lesspipe %s', 'GTK_IM_MODULE': 'ibus', '_': '/home/thomasokeeffe/.local/bin/thefuck', 'LC_ALL': 'C', 'GIT_TRACE': '1'}; is slow: took: 0:00:00.001356
DEBUG: Importing rule: ag_literal; took: 0:00:00.000609
DEBUG: Importing rule: apt_get; took: 0:00:00.001838
DEBUG: Total took: 0:00:00.028332
Traceback (most recent call last):
File "/home/thomasokeeffe/.local/bin/thefuck", line 11, in <module>
sys.exit(main())
File "/home/thomasokeeffe/.local/lib/python3.6/site-packages/thefuck/entrypoints/main.py", line 25, in main
fix_command(known_args)
File "/home/thomasokeeffe/.local/lib/python3.6/site-packages/thefuck/entrypoints/fix_command.py", line 41, in fix_command
corrected_commands = get_corrected_commands(command)
File "/home/thomasokeeffe/.local/lib/python3.6/site-packages/thefuck/corrector.py", line 89, in get_corrected_commands
corrected for rule in get_rules()
File "/home/thomasokeeffe/.local/lib/python3.6/site-packages/thefuck/corrector.py", line 49, in get_rules
key=lambda rule: rule.priority)
File "/home/thomasokeeffe/.local/lib/python3.6/site-packages/thefuck/corrector.py", line 17, in get_loaded_rules
rule = Rule.from_path(path)
File "/home/thomasokeeffe/.local/lib/python3.6/site-packages/thefuck/types.py", line 140, in from_path
rule_module = load_source(name, str(path))
File "/usr/lib/python3.6/imp.py", line 172, in load_source
module = _load(spec)
File "<frozen importlib._bootstrap>", line 696, in _load
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/thomasokeeffe/.local/lib/python3.6/site-packages/thefuck/rules/apt_get.py", line 8, in <module>
command_not_found = CommandNotFound()
TypeError: 'module' object is not callable
raabf and scytherswings