nvbn / thefuck

Magnificent app which corrects your previous console command.
MIT License
83.62k stars 3.41k forks source link

`<editor> <bash-path> +1 && puthon` suggestion instead of `python` #1409

Closed antony-frolov closed 6 months ago

antony-frolov commented 8 months ago

The output of thefuck --version (something like The Fuck 3.1 using Python 3.5.0 and Bash 4.4.12(1)-release):

The Fuck 3.32 using Python 3.10.12 and ZSH 5.9

Your system (Debian 7, ArchLinux, Windows, etc.):

macOS 13.5.2

How to reproduce the bug:

Try executing `puthon`, try to fix with `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': [],
 'excluded_search_path_prefixes': [],
 'history_limit': None,
 'instant_mode': False,
 'no_colors': False,
 'num_close_matches': 3,
 'priority': {},
 'repeat': False,
 'require_confirmation': True,
 'rules': [<const: All rules enabled>],
 'slow_commands': ['lein', 'react-native', 'gradle', './gradlew', 'vagrant'],
 'user_dir': PosixPath('/Users/lovanto/.config/thefuck'),
 'wait_command': 3,
 'wait_slow_command': 15}
DEBUG: Received output: /nix/store/3ln9yvs9pg78qvabh89y0a4m1hqzyl1h-bash-5.2-p15/bin/sh: line 1: iputhon: command not found

DEBUG: Call: iputhon; with env: {'SHELL': '/bin/zsh', 'LSCOLORS': 'Gxfxcxdxbxegedabagacad', 'ITERM_PROFILE': 'Default', 'TF_SHELL': 'zsh', '__HM_SESS_VARS_SOURCED': '1', 'COLORTERM': 'truecolor', 'LESS': '-R', 'XPC_FLAGS': '0x0', 'TERM_PROGRAM_VERSION': '3.4.20', 'CONDA_EXE': '/Users/lovanto/micromamba/bin/conda', '_CE_M': '', 'PYTHONNOUSERSITE': 'true', 'THEME': 'light', '_P9K_TTY': '/dev/ttys014', '__CFBundleIdentifier': 'com.googlecode.iterm2', 'SSH_AUTH_SOCK': '/private/tmp/com.apple.launchd.yj8MqaCn3m/Listeners', 'P9K_TTY': 'old', 'TERM_SESSION_ID': 'w0t2p0:40B49A13-6C30-43B0-AD61-C3F3395A1D07', 'CONDA_HOME': '/Users/lovanto/micromamba', 'HOMEBREW_PREFIX': '/usr/local', 'EDITOR': 'vim', 'PWD': '/Users/lovanto', 'NIX_PROFILES': '/nix/var/nix/profiles/default /Users/lovanto/.nix-profile', 'LOGNAME': 'lovanto', 'MAMBA_ROOT_PREFIX': '/Users/lovanto/micromamba', 'MANPATH': '/usr/local/share/man::', 'LaunchInstanceID': '833F1ACB-6672-4494-8E4B-05F0B7D08576', 'TZ': 'Europe/Moscow', 'ZSH_TMUX_CONFIG': '/Users/lovanto/.tmux.conf', 'COMMAND_MODE': 'unix2003', 'ITERM_SESSION_ID': 'w0t2p0:40B49A13-6C30-43B0-AD61-C3F3395A1D07', 'HOME': '/Users/lovanto', 'LS_COLORS': 'di=1;36:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43', '_ZSH_TMUX_FIXED_CONFIG': '/Users/lovanto/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/tmux/tmux.extra.conf', 'SECURITYSESSIONID': '186a5', 'NIX_SSL_CERT_FILE': '/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt', 'TMPDIR': '/var/folders/h_/h1z2cq811zn2_ph8f8hmktb41_07w9/T/', 'LC_TERMINAL': 'iTerm2', 'BAT_THEME': 'gruvbox-light', 'TF_ALIAS': 'fuck', 'INFOPATH': '/usr/local/share/info:', 'MAMBA_EXE': '/Users/lovanto/.local/bin/micromamba', 'TERM': 'xterm-256color', '_CE_CONDA': '', 'TF_HISTORY': 'export EDITOR=vim\nfuck\niputhon\nfuck\nputhon\nfuck\nthefuck --version\nneofetch\nTHEFUCK_DEBUG=true fuck\niputhon', 'USER': 'lovanto', 'PYTHONIOENCODING': 'utf-8', 'COLORFGBG': '15;0', 'TF_SHELL_ALIASES': '-=\'cd -\'\n...=../..\n....=../../..\n.....=../../../..\n......=../../../../..\n1=\'cd -1\'\n2=\'cd -2\'\n3=\'cd -3\'\n4=\'cd -4\'\n5=\'cd -5\'\n6=\'cd -6\'\n7=\'cd -7\'\n8=\'cd -8\'\n9=\'cd -9\'\n_=\'sudo \'\ncat=bat\nduf=\'duf -theme ansi -only local\'\negrep=\'grep -E --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn,.idea,.tox}\'\nfgrep=\'grep -F --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn,.idea,.tox}\'\nfsh-alias=fast-theme\ng=git\nga=\'git add\'\ngaa=\'git add --all\'\ngam=\'git am\'\ngama=\'git am --abort\'\ngamc=\'git am --continue\'\ngams=\'git am --skip\'\ngamscp=\'git am --show-current-patch\'\ngap=\'git apply\'\ngapa=\'git add --patch\'\ngapt=\'git apply --3way\'\ngau=\'git add --update\'\ngav=\'git add --verbose\'\ngb=\'git branch\'\ngbD=\'git branch --delete --force\'\ngba=\'git branch --all\'\ngbd=\'git branch --delete\'\ngbg=\'LANG=C git branch -vv | grep ": gone\\]"\'\ngbgD=\'LANG=C git branch --no-color -vv | grep ": gone\\]" | awk \'\\\'\'{print $1}\'\\\'\' | xargs git branch -D\'\ngbgd=\'LANG=C git branch --no-color -vv | grep ": gone\\]" | awk \'\\\'\'{print $1}\'\\\'\' | xargs git branch -d\'\ngbl=\'git blame -w\'\ngbm=\'git branch --move\'\ngbnm=\'git branch --no-merged\'\ngbr=\'git branch --remote\'\ngbs=\'git bisect\'\ngbsb=\'git bisect bad\'\ngbsg=\'git bisect good\'\ngbsn=\'git bisect new\'\ngbso=\'git bisect old\'\ngbsr=\'git bisect reset\'\ngbss=\'git bisect start\'\ngc=\'git commit --verbose\'\n\'gc!\'=\'git commit --verbose --amend\'\ngca=\'git commit --verbose --all\'\n\'gca!\'=\'git commit --verbose --all --amend\'\ngcam=\'git commit --all --message\'\n\'gcan!\'=\'git commit --verbose --all --no-edit --amend\'\n\'gcans!\'=\'git commit --verbose --all --signoff --no-edit --amend\'\ngcas=\'git commit --all --signoff\'\ngcasm=\'git commit --all --signoff --message\'\ngcb=\'git checkout -b\'\ngcd=\'git checkout $(git_develop_branch)\'\ngcf=\'git config --list\'\ngcl=\'git clone --recurse-submodules\'\ngclean=\'git clean --interactive -d\'\ngcm=\'git checkout $(git_main_branch)\'\ngcmsg=\'git commit --message\'\n\'gcn!\'=\'git commit --verbose --no-edit --amend\'\ngco=\'git checkout\'\ngcor=\'git checkout --recurse-submodules\'\ngcount=\'git shortlog --summary --numbered\'\ngcp=\'git cherry-pick\'\ngcpa=\'git cherry-pick --abort\'\ngcpc=\'git cherry-pick --continue\'\ngcs=\'git commit --gpg-sign\'\ngcsm=\'git commit --signoff --message\'\ngcss=\'git commit --gpg-sign --signoff\'\ngcssm=\'git commit --gpg-sign --signoff --message\'\ngd=\'git diff\'\ngdca=\'git diff --cached\'\ngdct=\'git describe --tags $(git rev-list --tags --max-count=1)\'\ngdcw=\'git diff --cached --word-diff\'\ngds=\'git diff --staged\'\ngdt=\'git diff-tree --no-commit-id --name-only -r\'\ngdup=\'git diff @{upstream}\'\ngdw=\'git diff --word-diff\'\ngf=\'git fetch\'\ngfa=\'git fetch --all --prune --jobs=10\'\ngfg=\'git ls-files | grep\'\ngfo=\'git fetch origin\'\ngg=\'git gui citool\'\ngga=\'git gui citool --amend\'\nggpull=\'git pull origin "$(git_current_branch)"\'\nggpur=ggu\nggpush=\'git push origin "$(git_current_branch)"\'\nggsup=\'git branch --set-upstream-to=origin/$(git_current_branch)\'\nghh=\'git help\'\ngignore=\'git update-index --assume-unchanged\'\ngignored=\'git ls-files -v | grep "^[[:lower:]]"\'\ngit-svn-dcommit-push=\'git svn dcommit && git push github $(git_main_branch):svntrunk\'\ngk=\'\\gitk --all --branches &!\'\ngke=\'\\gitk --all $(git log --walk-reflogs --pretty=%h) &!\'\ngl=\'git pull\'\nglg=\'git log --stat\'\nglgg=\'git log --graph\'\nglgga=\'git log --graph --decorate --all\'\nglgm=\'git log --graph --max-count=10\'\nglgp=\'git log --stat --patch\'\nglo=\'git log --oneline --decorate\'\ngloburl=\'noglob urlglobber \'\nglod=\'git log --graph --pretty="%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset"\'\nglods=\'git log --graph --pretty="%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset" --date=short\'\nglog=\'git log --oneline --decorate --graph\'\ngloga=\'git log --oneline --decorate --graph --all\'\nglol=\'git log --graph --pretty="%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset"\'\nglola=\'git log --graph --pretty="%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset" --all\'\nglols=\'git log --graph --pretty="%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset" --stat\'\nglp=_git_log_prettily\ngluc=\'git pull upstream $(git_current_branch)\'\nglum=\'git pull upstream $(git_main_branch)\'\ngm=\'git merge\'\ngma=\'git merge --abort\'\ngmom=\'git merge origin/$(git_main_branch)\'\ngms=\'git merge --squash\'\ngmtl=\'git mergetool --no-prompt\'\ngmtlvim=\'git mergetool --no-prompt --tool=vimdiff\'\ngmum=\'git merge upstream/$(git_main_branch)\'\ngp=\'git push\'\ngpd=\'git push --dry-run\'\ngpf=\'git push --force-with-lease --force-if-includes\'\n\'gpf!\'=\'git push --force\'\ngpoat=\'git push origin --all && git push origin --tags\'\ngpod=\'git push origin --delete\'\ngpr=\'git pull --rebase\'\ngpra=\'git pull --rebase --autostash\'\ngprav=\'git pull --rebase --autostash -v\'\ngpristine=\'git reset --hard && git clean --force -dfx\'\ngprom=\'git pull --rebase origin $(git_main_branch)\'\ngpromi=\'git pull --rebase=interactive origin $(git_main_branch)\'\ngprv=\'git pull --rebase -v\'\ngpsup=\'git push --set-upstream origin $(git_current_branch)\'\ngpsupf=\'git push --set-upstream origin $(git_current_branch) --force-with-lease --force-if-includes\'\ngpu=\'git push upstream\'\ngpv=\'git push --verbose\'\ngr=\'git remote\'\ngra=\'git remote add\'\ngrb=\'git rebase\'\ngrba=\'git rebase --abort\'\ngrbc=\'git rebase --continue\'\ngrbd=\'git rebase $(git_develop_branch)\'\ngrbi=\'git rebase --interactive\'\ngrbm=\'git rebase $(git_main_branch)\'\ngrbo=\'git rebase --onto\'\ngrbom=\'git rebase origin/$(git_main_branch)\'\ngrbs=\'git rebase --skip\'\ngrep=\'grep --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn,.idea,.tox}\'\ngrev=\'git revert\'\ngrh=\'git reset\'\ngrhh=\'git reset --hard\'\ngrhk=\'git reset --keep\'\ngrhs=\'git reset --soft\'\ngrm=\'git rm\'\ngrmc=\'git rm --cached\'\ngrmv=\'git remote rename\'\ngroh=\'git reset origin/$(git_current_branch) --hard\'\ngrrm=\'git remote remove\'\ngrs=\'git restore\'\ngrset=\'git remote set-url\'\ngrss=\'git restore --source\'\ngrst=\'git restore --staged\'\ngrt=\'cd "$(git rev-parse --show-toplevel || echo .)"\'\ngru=\'git reset --\'\ngrup=\'git remote update\'\ngrv=\'git remote --verbose\'\ngsb=\'git status --short --branch\'\ngsd=\'git svn dcommit\'\ngsh=\'git show\'\ngsi=\'git submodule init\'\ngsps=\'git show --pretty=short --show-signature\'\ngsr=\'git svn rebase\'\ngss=\'git status --short\'\ngst=\'git status\'\ngsta=\'git stash push\'\ngstaa=\'git stash apply\'\ngstall=\'git stash --all\'\ngstc=\'git stash clear\'\ngstd=\'git stash drop\'\ngstl=\'git stash list\'\ngstp=\'git stash pop\'\ngsts=\'git stash show --patch\'\ngstu=\'gsta --include-untracked\'\ngsu=\'git submodule update\'\ngsw=\'git switch\'\ngswc=\'git switch --create\'\ngswd=\'git switch $(git_develop_branch)\'\ngswm=\'git switch $(git_main_branch)\'\ngta=\'git tag --annotate\'\ngtl=\'gtl(){ git tag --sort=-v:refname -n --list "${1}*" }; noglob gtl\'\ngts=\'git tag --sign\'\ngtv=\'git tag | sort -V\'\ngunignore=\'git update-index --no-assume-unchanged\'\ngunwip=\'git rev-list --max-count=1 --format="%s" HEAD | grep -q "\\--wip--" && git reset HEAD~1\'\ngup=$\'\\n    print -Pu2 "%F{yellow}[oh-my-zsh] \\\'%F{red}gup%F{yellow}\\\' is a deprecated alias, using \\\'%F{green}gpr%F{yellow}\\\' instead.%f"\\n    gpr\'\ngupa=$\'\\n    print -Pu2 "%F{yellow}[oh-my-zsh] \\\'%F{red}gupa%F{yellow}\\\' is a deprecated alias, using \\\'%F{green}gpra%F{yellow}\\\' instead.%f"\\n    gpra\'\ngupav=$\'\\n    print -Pu2 "%F{yellow}[oh-my-zsh] \\\'%F{red}gupav%F{yellow}\\\' is a deprecated alias, using \\\'%F{green}gprav%F{yellow}\\\' instead.%f"\\n    gprav\'\ngupom=$\'\\n    print -Pu2 "%F{yellow}[oh-my-zsh] \\\'%F{red}gupom%F{yellow}\\\' is a deprecated alias, using \\\'%F{green}gprom%F{yellow}\\\' instead.%f"\\n    gprom\'\ngupomi=$\'\\n    print -Pu2 "%F{yellow}[oh-my-zsh] \\\'%F{red}gupomi%F{yellow}\\\' is a deprecated alias, using \\\'%F{green}gpromi%F{yellow}\\\' instead.%f"\\n    gpromi\'\ngupv=$\'\\n    print -Pu2 "%F{yellow}[oh-my-zsh] \\\'%F{red}gupv%F{yellow}\\\' is a deprecated alias, using \\\'%F{green}gprv%F{yellow}\\\' instead.%f"\\n    gprv\'\ngwch=\'git whatchanged -p --abbrev-commit --pretty=medium\'\ngwip=\'git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit --no-verify --no-gpg-sign --message "--wip-- [skip ci]"\'\ngwt=\'git worktree\'\ngwta=\'git worktree add\'\ngwtls=\'git worktree list\'\ngwtmv=\'git worktree move\'\ngwtrm=\'git worktree remove\'\nhistory=omz_history\nimgcat=/Users/lovanto/.iterm2/imgcat\nimgls=/Users/lovanto/.iterm2/imgls\nipython=\'ipython --TerminalInteractiveShell.highlighting_style=gruvbox-light\'\nit2api=/Users/lovanto/.iterm2/it2api\nit2attention=/Users/lovanto/.iterm2/it2attention\nit2check=/Users/lovanto/.iterm2/it2check\nit2copy=/Users/lovanto/.iterm2/it2copy\nit2dl=/Users/lovanto/.iterm2/it2dl\nit2getvar=/Users/lovanto/.iterm2/it2getvar\nit2git=/Users/lovanto/.iterm2/it2git\nit2profile=/Users/lovanto/.iterm2/it2profile\nit2setcolor=/Users/lovanto/.iterm2/it2setcolor\nit2setkeylabel=/Users/lovanto/.iterm2/it2setkeylabel\nit2tip=/Users/lovanto/.iterm2/it2tip\nit2ul=/Users/lovanto/.iterm2/it2ul\nit2universion=/Users/lovanto/.iterm2/it2universion\nl=\'ls -lah\'\nla=\'ls -lAh\'\nldocker=lazydocker\nlgit=lazygit\nll=\'eza -lhg --git --group-directories-first\'\nls=eza\nlsa=\'ls -lah\'\nma=\'mamba activate\'\nmamba=micromamba\nmcen=\'mamba create -n\'\nmd=\'mkdir -p\'\nmda=\'mamba deactivate\'\nmels=\'mamba env list\'\nmi=\'mamba install\'\nmls=\'mamba list\'\nmr=\'mamba remove\'\nrd=rmdir\nrm=\'rm -I\'\nrun-help=man\nta=\'tmux attach -t\'\ntad=\'tmux attach -d -t\'\ntds=_tmux_directory_session\ntkss=\'tmux kill-session -t\'\ntksv=\'tmux kill-server\'\ntl=\'tmux list-sessions\'\ntmux=_zsh_tmux_plugin_run\ntmuxconf=\'$EDITOR $ZSH_TMUX_CONFIG\'\ntree=\'eza --tree --level 3\'\nts=\'tmux new-session -s\'\nvim=nvim\nwhich-command=whence\nx=extract\nz=__zoxide_z\nzi=__zoxide_zi', 'HOMEBREW_CELLAR': '/usr/local/Cellar', 'CONDA_SHLVL': '0', 'LC_TERMINAL_VERSION': '3.4.20', 'PROMPT_EOL_MARK': '', 'DISPLAY': '/private/tmp/com.apple.launchd.cBawDYeetn/org.xquartz:0', 'SHLVL': '1', 'PAGER': 'less', 'HOMEBREW_REPOSITORY': '/usr/local/Homebrew', '_P9K_SSH_TTY': '/dev/ttys014', 'XPC_SERVICE_NAME': '0', 'CONDA_PYTHON_EXE': '/Users/lovanto/micromamba/bin/python', 'LC_CTYPE': 'UTF-8', 'ZSH_TMUX_TERM': 'screen-256color', 'P9K_SSH': '0', 'PATH': '/nix/store/aa3nnkfyif67k6861vd77g4cm4rgbqh8-python3-3.10.12/bin:/nix/store/l8jznf1k9f4nalajp2kd3pxpniwvkmjb-thefuck-3.32/bin:/Users/lovanto/micromamba/condabin:/Users/lovanto/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/bin:/usr/local/sbin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/usr/local/munki:/opt/X11/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/lovanto/.local/bin:/Users/lovanto/.cargo/bin:/Users/lovanto/.antigen/bundles/robbyrussell/oh-my-zsh/lib:/Users/lovanto/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/git:/Users/lovanto/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/tmux:/Users/lovanto/.antigen/bundles/zsh-users/zsh-autosuggestions:/Users/lovanto/.antigen/bundles/jeffreytse/zsh-vi-mode:/Users/lovanto/.antigen/bundles/antony-frolov/conda-zsh-completion:/Users/lovanto/.antigen/bundles/zsh-users/zsh-completions:/Users/lovanto/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/extract:/Users/lovanto/.antigen/bundles/mafredri/zsh-async-main:/Users/lovanto/.antigen/bundles/zdharma-continuum/fast-syntax-highlighting:/Users/lovanto/.antigen/bundles/romkatv/powerlevel10k', 'THEFUCK_DEBUG': 'true', 'FZF_DEFAULT_OPTS': ' --color=bg+:#ebdbb2,bg:#fbf1c7,spinner:#427b58,hl:#076678 --color=fg:#665c54,header:#076678,info:#b57614,pointer:#427b58 --color=marker:#427b58,fg+:#3c3836,prompt:#b57614,hl+:#076678', 'CONDA_ROOT_PREFIX': '/Users/lovanto/micromamba', 'OLDPWD': '/Users/lovanto', '__CF_USER_TEXT_ENCODING': '0x2A01F89:0x0:0x0', 'TERM_PROGRAM': 'iTerm.app', 'LC_ALL': 'C', 'LANG': 'C', 'GIT_TRACE': '1'}; is slow: False took: 0:00:00.007643
DEBUG: Importing rule: adb_unknown_command; took: 0:00:00.000389
DEBUG: Importing rule: ag_literal; took: 0:00:00.000400
DEBUG: Importing rule: apt_get; took: 0:00:00.001568
DEBUG: Importing rule: apt_get_search; took: 0:00:00.000293
DEBUG: Importing rule: apt_invalid_operation; took: 0:00:00.000653
DEBUG: Importing rule: apt_list_upgradable; took: 0:00:00.000308
DEBUG: Importing rule: apt_upgrade; took: 0:00:00.000405
DEBUG: Importing rule: aws_cli; took: 0:00:00.000287
DEBUG: Importing rule: az_cli; took: 0:00:00.000285
DEBUG: Importing rule: brew_cask_dependency; took: 0:00:00.000714
DEBUG: Importing rule: brew_install; took: 0:00:00.000235
DEBUG: Importing rule: brew_link; took: 0:00:00.000282
DEBUG: Importing rule: brew_reinstall; took: 0:00:00.000735
DEBUG: Importing rule: brew_uninstall; took: 0:00:00.000371
DEBUG: Importing rule: brew_unknown_command; took: 0:00:00.000272
DEBUG: Importing rule: brew_update_formula; took: 0:00:00.000289
DEBUG: Importing rule: cargo; took: 0:00:00.000208
DEBUG: Importing rule: cargo_no_command; took: 0:00:00.000313
DEBUG: Importing rule: cat_dir; took: 0:00:00.000331
DEBUG: Importing rule: cd_correction; took: 0:00:00.001474
DEBUG: Importing rule: cd_cs; took: 0:00:00.000247
DEBUG: Importing rule: cd_mkdir; took: 0:00:00.000406
DEBUG: Importing rule: cd_parent; took: 0:00:00.000231
DEBUG: Importing rule: chmod_x; took: 0:00:00.000353
DEBUG: Importing rule: choco_install; took: 0:00:00.000933
DEBUG: Importing rule: composer_not_command; took: 0:00:00.000300
DEBUG: Importing rule: conda_mistype; took: 0:00:00.000314
DEBUG: Importing rule: cp_create_destination; took: 0:00:00.000301
DEBUG: Importing rule: cp_omitting_directory; took: 0:00:00.000326
DEBUG: Importing rule: cpp11; took: 0:00:00.000276
DEBUG: Importing rule: dirty_untar; took: 0:00:00.001752
DEBUG: Importing rule: dirty_unzip; took: 0:00:00.000312
DEBUG: Importing rule: django_south_ghost; took: 0:00:00.000216
DEBUG: Importing rule: django_south_merge; took: 0:00:00.000205
DEBUG: Importing rule: dnf_no_such_command; took: 0:00:00.001005
DEBUG: Importing rule: docker_image_being_used_by_container; took: 0:00:00.000309
DEBUG: Importing rule: docker_login; took: 0:00:00.000288
DEBUG: Importing rule: docker_not_command; took: 0:00:00.000525
DEBUG: Importing rule: dry; took: 0:00:00.000220
DEBUG: Importing rule: fab_command_not_found; took: 0:00:00.000437
DEBUG: Importing rule: fix_alt_space; took: 0:00:00.000296
DEBUG: Importing rule: fix_file; took: 0:00:00.002188
DEBUG: Importing rule: gem_unknown_command; took: 0:00:00.000522
DEBUG: Importing rule: git_add; took: 0:00:00.000577
DEBUG: Importing rule: git_add_force; took: 0:00:00.000273
DEBUG: Importing rule: git_bisect_usage; took: 0:00:00.000278
DEBUG: Importing rule: git_branch_0flag; took: 0:00:00.000279
DEBUG: Importing rule: git_branch_delete; took: 0:00:00.000270
DEBUG: Importing rule: git_branch_delete_checked_out; took: 0:00:00.000275
DEBUG: Importing rule: git_branch_exists; took: 0:00:00.000281
DEBUG: Importing rule: git_branch_list; took: 0:00:00.000323
DEBUG: Importing rule: git_checkout; took: 0:00:00.000286
DEBUG: Importing rule: git_clone_git_clone; took: 0:00:00.000264
DEBUG: Importing rule: git_commit_add; took: 0:00:00.000359
DEBUG: Importing rule: git_commit_amend; took: 0:00:00.000281
DEBUG: Importing rule: git_commit_reset; took: 0:00:00.000274
DEBUG: Importing rule: git_diff_no_index; took: 0:00:00.000273
DEBUG: Importing rule: git_diff_staged; took: 0:00:00.000276
DEBUG: Importing rule: git_fix_stash; took: 0:00:00.000292
DEBUG: Importing rule: git_flag_after_filename; took: 0:00:00.000275
DEBUG: Importing rule: git_help_aliased; took: 0:00:00.000272
DEBUG: Importing rule: git_hook_bypass; took: 0:00:00.000288
DEBUG: Importing rule: git_lfs_mistype; took: 0:00:00.000274
DEBUG: Importing rule: git_main_master; took: 0:00:00.000320
DEBUG: Importing rule: git_merge; took: 0:00:00.000286
DEBUG: Importing rule: git_merge_unrelated; took: 0:00:00.000268
DEBUG: Importing rule: git_not_command; took: 0:00:00.000322
DEBUG: Importing rule: git_pull; took: 0:00:00.000275
DEBUG: Importing rule: git_pull_clone; took: 0:00:00.000269
DEBUG: Importing rule: git_pull_uncommitted_changes; took: 0:00:00.000298
DEBUG: Importing rule: git_push; took: 0:00:00.000279
DEBUG: Importing rule: git_push_different_branch_names; took: 0:00:00.000263
DEBUG: Importing rule: git_push_force; took: 0:00:00.000269
DEBUG: Importing rule: git_push_pull; took: 0:00:00.000264
DEBUG: Importing rule: git_push_without_commits; took: 0:00:00.000241
DEBUG: Importing rule: git_rebase_merge_dir; took: 0:00:00.000273
DEBUG: Importing rule: git_rebase_no_changes; took: 0:00:00.000239
DEBUG: Importing rule: git_remote_delete; took: 0:00:00.000255
DEBUG: Importing rule: git_remote_seturl_add; took: 0:00:00.000237
DEBUG: Importing rule: git_rm_local_modifications; took: 0:00:00.000267
DEBUG: Importing rule: git_rm_recursive; took: 0:00:00.000262
DEBUG: Importing rule: git_rm_staged; took: 0:00:00.000255
DEBUG: Importing rule: git_stash; took: 0:00:00.000264
DEBUG: Importing rule: git_stash_pop; took: 0:00:00.000306
DEBUG: Importing rule: git_tag_force; took: 0:00:00.000265
DEBUG: Importing rule: git_two_dashes; took: 0:00:00.000262
DEBUG: Importing rule: go_run; took: 0:00:00.000267
DEBUG: Importing rule: go_unknown_command; took: 0:00:00.000617
DEBUG: Importing rule: gradle_no_task; took: 0:00:00.000490
DEBUG: Importing rule: gradle_wrapper; took: 0:00:00.000276
DEBUG: Importing rule: grep_arguments_order; took: 0:00:00.000330
DEBUG: Importing rule: grep_recursive; took: 0:00:00.000302
DEBUG: Importing rule: grunt_task_not_found; took: 0:00:00.000454
DEBUG: Importing rule: gulp_not_task; took: 0:00:00.000306
DEBUG: Importing rule: has_exists_script; took: 0:00:00.000277
DEBUG: Importing rule: heroku_multiple_apps; took: 0:00:00.000277
DEBUG: Importing rule: heroku_not_command; took: 0:00:00.000279
DEBUG: Importing rule: history; took: 0:00:00.000217
DEBUG: Importing rule: hostscli; took: 0:00:00.000405
DEBUG: Importing rule: ifconfig_device_not_found; took: 0:00:00.000448
DEBUG: Importing rule: java; took: 0:00:00.000314
DEBUG: Importing rule: javac; took: 0:00:00.000288
DEBUG: Importing rule: lein_not_task; took: 0:00:00.000325
DEBUG: Importing rule: ln_no_hard_link; took: 0:00:00.000425
DEBUG: Importing rule: ln_s_order; took: 0:00:00.000298
DEBUG: Importing rule: long_form_help; took: 0:00:00.000236
DEBUG: Importing rule: ls_all; took: 0:00:00.000282
DEBUG: Importing rule: ls_lah; took: 0:00:00.000277
DEBUG: Importing rule: man; took: 0:00:00.000283
DEBUG: Importing rule: man_no_space; took: 0:00:00.000208
DEBUG: Importing rule: mercurial; took: 0:00:00.000282
DEBUG: Importing rule: missing_space_before_subcommand; took: 0:00:00.000220
DEBUG: Importing rule: mkdir_p; took: 0:00:00.000268
DEBUG: Importing rule: mvn_no_command; took: 0:00:00.000276
DEBUG: Importing rule: mvn_unknown_lifecycle_phase; took: 0:00:00.000278
DEBUG: Importing rule: nixos_cmd_not_found; took: 0:00:00.000857
DEBUG: Importing rule: no_command; took: 0:00:00.000284
DEBUG: Importing rule: no_such_file; took: 0:00:00.000207
DEBUG: Importing rule: npm_missing_script; took: 0:00:00.000710
DEBUG: Importing rule: npm_run_script; took: 0:00:00.000298
DEBUG: Importing rule: npm_wrong_command; took: 0:00:00.000322
DEBUG: Importing rule: omnienv_no_such_command; took: 0:00:00.001371
DEBUG: Importing rule: open; took: 0:00:00.000309
DEBUG: Importing rule: pacman; took: 0:00:00.001268
DEBUG: Importing rule: pacman_invalid_option; took: 0:00:00.000306
DEBUG: Importing rule: pacman_not_found; took: 0:00:00.000231
DEBUG: Importing rule: path_from_history; took: 0:00:00.000240
DEBUG: Importing rule: php_s; took: 0:00:00.000266
DEBUG: Importing rule: pip_install; took: 0:00:00.000281
DEBUG: Importing rule: pip_unknown_command; took: 0:00:00.000285
DEBUG: Importing rule: port_already_in_use; took: 0:00:00.000394
DEBUG: Importing rule: prove_recursively; took: 0:00:00.000348
DEBUG: Importing rule: python_command; took: 0:00:00.000267
DEBUG: Importing rule: python_execute; took: 0:00:00.000262
DEBUG: Importing rule: python_module_error; took: 0:00:00.000194
DEBUG: Importing rule: quotation_marks; took: 0:00:00.000178
DEBUG: Importing rule: rails_migrations_pending; took: 0:00:00.000184
DEBUG: Importing rule: react_native_command_unrecognized; took: 0:00:00.000288
DEBUG: Importing rule: remove_shell_prompt_literal; took: 0:00:00.000196
DEBUG: Importing rule: remove_trailing_cedilla; took: 0:00:00.000191
DEBUG: Importing rule: rm_dir; took: 0:00:00.000234
DEBUG: Importing rule: rm_root; took: 0:00:00.000234
DEBUG: Importing rule: scm_correction; took: 0:00:00.000257
DEBUG: Importing rule: sed_unterminated_s; took: 0:00:00.000246
DEBUG: Importing rule: sl_ls; took: 0:00:00.000181
DEBUG: Importing rule: ssh_known_hosts; took: 0:00:00.000297
DEBUG: Importing rule: sudo; took: 0:00:00.000195
DEBUG: Importing rule: sudo_command_from_user_path; took: 0:00:00.000256
DEBUG: Importing rule: switch_lang; took: 0:00:00.000269
DEBUG: Importing rule: systemctl; took: 0:00:00.000277
DEBUG: Importing rule: terraform_init; took: 0:00:00.000316
DEBUG: Importing rule: test.py; took: 0:00:00.000189
DEBUG: Importing rule: tmux; took: 0:00:00.000247
DEBUG: Importing rule: touch; took: 0:00:00.000240
DEBUG: Importing rule: tsuru_login; took: 0:00:00.000240
DEBUG: Importing rule: tsuru_not_command; took: 0:00:00.000246
DEBUG: Importing rule: unknown_command; took: 0:00:00.000183
DEBUG: Importing rule: unsudo; took: 0:00:00.000177
DEBUG: Importing rule: vagrant_up; took: 0:00:00.000240
DEBUG: Importing rule: whois; took: 0:00:00.000400
DEBUG: Importing rule: workon_doesnt_exists; took: 0:00:00.000275
DEBUG: Importing rule: wrong_hyphen_before_subcommand; took: 0:00:00.000249
DEBUG: Importing rule: yarn_alias; took: 0:00:00.000239
DEBUG: Importing rule: yarn_command_not_found; took: 0:00:00.000734
DEBUG: Importing rule: yarn_command_replaced; took: 0:00:00.000355
DEBUG: Importing rule: yarn_help; took: 0:00:00.000256
DEBUG: Importing rule: yum_invalid_operation; took: 0:00:00.001309
DEBUG: Trying rule: path_from_history; took: 0:00:00.000421
DEBUG: Trying rule: cd_cs; took: 0:00:00.000057
DEBUG: Trying rule: dry; took: 0:00:00.000003
DEBUG: Trying rule: git_stash_pop; took: 0:00:00.000049
DEBUG: Trying rule: test.py; took: 0:00:00.000002
DEBUG: Trying rule: adb_unknown_command; took: 0:00:00.000017
DEBUG: Trying rule: ag_literal; took: 0:00:00.000027
DEBUG: Trying rule: aws_cli; took: 0:00:00.000022
DEBUG: Trying rule: az_cli; took: 0:00:00.000024
DEBUG: Trying rule: brew_cask_dependency; took: 0:00:00.000021
DEBUG: Trying rule: brew_install; took: 0:00:00.000002
DEBUG: Trying rule: brew_link; took: 0:00:00.000020
DEBUG: Trying rule: brew_reinstall; took: 0:00:00.000018
DEBUG: Trying rule: brew_uninstall; took: 0:00:00.000019
DEBUG: Trying rule: brew_unknown_command; took: 0:00:00.000004
DEBUG: Trying rule: brew_update_formula; took: 0:00:00.000018
DEBUG: Trying rule: cargo; took: 0:00:00.000002
DEBUG: Trying rule: cargo_no_command; took: 0:00:00.000019
DEBUG: Trying rule: cat_dir; took: 0:00:00.000019
DEBUG: Trying rule: cd_correction; took: 0:00:00.000028
DEBUG: Trying rule: cd_mkdir; took: 0:00:00.000025
DEBUG: Trying rule: cd_parent; took: 0:00:00.000002
DEBUG: Trying rule: chmod_x; took: 0:00:00.000005
DEBUG: Trying rule: composer_not_command; took: 0:00:00.000021
DEBUG: Trying rule: conda_mistype; took: 0:00:00.000023
DEBUG: Trying rule: cp_create_destination; took: 0:00:00.000020
DEBUG: Trying rule: cp_omitting_directory; took: 0:00:00.000028
DEBUG: Trying rule: cpp11; took: 0:00:00.000020
DEBUG: Trying rule: dirty_untar; took: 0:00:00.000020
DEBUG: Trying rule: dirty_unzip; took: 0:00:00.000020
DEBUG: Trying rule: django_south_ghost; took: 0:00:00.000002
DEBUG: Trying rule: django_south_merge; took: 0:00:00.000002
DEBUG: Trying rule: docker_image_being_used_by_container; took: 0:00:00.000021
DEBUG: Trying rule: docker_login; took: 0:00:00.000018
DEBUG: Trying rule: docker_not_command; took: 0:00:00.000025
DEBUG: Trying rule: fab_command_not_found; took: 0:00:00.000020
DEBUG: Trying rule: fix_alt_space; took: 0:00:00.000011
DEBUG: Trying rule: fix_file; took: 0:00:00.000046
vim /nix/store/3ln9yvs9pg78qvabh89y0a4m1hqzyl1h-bash-5.2-p15/bin/sh +1 && iputhon [enter/↑/↓/ctrl+c]
antony-frolov commented 8 months ago

The next suggestion in the list is actually python but the first one always follows this weird scheme

sergeykorablin commented 6 months ago

The same problem here but editor is nano:

$ fuck  
/usr/bin/nano /bin/sh +1 && puthon [enter/↑/↓/ctrl+c]

The Fuck 3.32 using Python 3.12.1 and ZSH 5.9

sank8dalvi commented 6 months ago

https://github.com/nvbn/thefuck/issues/1153#issuecomment-759656972 This helped me as a workaround

exclude_rules = [ "fix_file" ]
antony-frolov commented 6 months ago

Thanks @sank8dalvi, worked for me too! Will close this issue in favor of the one you mentioned then.