nvbn / thefuck

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

fuck:history: bad option: -s #797

Closed fluxsauce closed 6 years ago

fluxsauce commented 6 years ago

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.):

zsh 5.3 (x86_64-apple-darwin17.0)

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

macOS 10.13.3

How to reproduce the bug:

ORG/PROJECT [ABC-7170] » git push
fatal: The current branch ABC-7170 has no upstream branch.
To push the current branch and set the remote as upstream, use

    git push --set-upstream origin ABC-7170

ORG/PROJECT [ABC-7170] » fuck
git push --set-upstream origin ABC-7170 [enter/↑/↓/ctrl+c]
Counting objects: 15, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (12/12), done.
Writing objects: 100% (15/15), 1.05 KiB | 1.05 MiB/s, done.
Total 15 (delta 6), reused 0 (delta 0)
remote: Resolving deltas: 100% (6/6), completed with 6 local objects.
To github.com:ORG/PROJECT.git
 * [new branch]      ABC-7170 -> ABC-7170
Branch 'ABC-7170' set up to track remote branch 'ABC-7170' from 'origin'.
fuck:history: bad option: -s

The output of The Fuck with THEFUCK_DEBUG=true exported (typically execute export THEFUCK_DEBUG=true in your shell before The Fuck):

ORG/PROJECT [ABC-7170] » git push
fatal: The current branch ABC-7170 has no upstream branch.
To push the current branch and set the remote as upstream, use

    git push --set-upstream origin ABC-7170

ORG/PROJECT [ABC-7170] » 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('/Users/LOL/.config/thefuck'),
 'wait_command': 3,
 'wait_slow_command': 15}
DEBUG: Received output: 16:19:25.706445 git.c:344               trace: built-in: git 'push'
fatal: The current branch ABC-7170 has no upstream branch.
To push the current branch and set the remote as upstream, use

    git push --set-upstream origin ABC-7170

DEBUG: Call: git push; with env: {'PATH': '/usr/local/opt/mysql@5.5/bin:/usr/local/sbin:/Users/LOL/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/munki:/Users/LOL/n/bin', 'SHELL': '/bin/bash', 'ZDOTDIR': '', 'TERM': 'xterm-256color', 'USER': 'LOL', 'COMMAND_MODE': 'unix2003', 'TMPDIR': '/var/folders/2d/0hp4g4v110s33npmq3srdr_c0000gp/T/', 'SSH_AUTH_SOCK': '/private/tmp/com.apple.launchd.ycwX9a0ZV2/Listeners', 'XPC_FLAGS': '0x0', '__CF_USER_TEXT_ENCODING': '0x1F6:0x0:0x0', 'Apple_PubSub_Socket_Render': '/private/tmp/com.apple.launchd.dPHMsv9XeV/Render', 'LOGNAME': 'LOL', 'LC_CTYPE': 'en_US.UTF-8', 'XPC_SERVICE_NAME': '0', 'HOME': '/Users/LOL', 'SHLVL': '1', 'PWD': '/Users/LOL/projects/ORG/PROJECT', 'OLDPWD': '/Users/LOL/projects/ORG/PROJECT', 'N_PREFIX': '/Users/LOL/n', 'ZSH': '/Users/LOL/.oh-my-zsh', 'PAGER': 'less', 'LESS': '-R', 'LSCOLORS': 'Gxfxcxdxbxegedabagacad', 'THEFUCK_DEBUG': 'true', 'TF_ALIAS': 'fuck', 'TF_SHELL_ALIASES': '-=\'cd -\'\n...=../..\n....=../../..\n.....=../../../..\n......=../../../../..\n1=\'cd -\'\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\nafind=\'ack -il\'\nd=\'dirs -v | head -10\'\ng=git\nga=\'git add\'\ngaa=\'git add --all\'\ngap=\'git apply\'\ngapa=\'git add --patch\'\ngau=\'git add --update\'\ngb=\'git branch\'\ngba=\'git branch -a\'\ngbd=\'git branch -d\'\ngbda=\'git branch --no-color --merged | command grep -vE "^(\\*|\\s*(master|develop|dev)\\s*$)" | command xargs -n 1 git branch -d\'\ngbl=\'git blame -b -w\'\ngbnm=\'git branch --no-merged\'\ngbr=\'git branch --remote\'\ngbs=\'git bisect\'\ngbsb=\'git bisect bad\'\ngbsg=\'git bisect good\'\ngbsr=\'git bisect reset\'\ngbss=\'git bisect start\'\ngc=\'git commit -v\'\n\'gc!\'=\'git commit -v --amend\'\ngca=\'git commit -v -a\'\n\'gca!\'=\'git commit -v -a --amend\'\ngcam=\'git commit -a -m\'\n\'gcan!\'=\'git commit -v -a --no-edit --amend\'\n\'gcans!\'=\'git commit -v -a -s --no-edit --amend\'\ngcb=\'git checkout -b\'\ngcd=\'git checkout develop\'\ngcf=\'git config --list\'\ngcl=\'git clone --recursive\'\ngclean=\'git clean -fd\'\ngcm=\'git checkout master\'\ngcmsg=\'git commit -m\'\n\'gcn!\'=\'git commit -v --no-edit --amend\'\ngco=\'git checkout\'\ngcount=\'git shortlog -sn\'\ngcp=\'git cherry-pick\'\ngcpa=\'git cherry-pick --abort\'\ngcpc=\'git cherry-pick --continue\'\ngcs=\'git commit -S\'\ngcsm=\'git commit -s -m\'\ngd=\'git diff\'\ngdca=\'git diff --cached\'\ngdct=\'git describe --tags `git rev-list --tags --max-count=1`\'\ngdcw=\'git diff --cached --word-diff\'\ngdt=\'git diff-tree --no-commit-id --name-only -r\'\ngdw=\'git diff --word-diff\'\ngf=\'git fetch\'\ngfa=\'git fetch --all --prune\'\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 master:svntrunk\'\ngk=\'\\gitk --all --branches\'\ngke=\'\\gitk --all $(git log -g --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 -p\'\nglo=\'git log --oneline --decorate\'\ngloburl=\'noglob urlglobber \'\nglog=\'git log --oneline --decorate --graph\'\ngloga=\'git log --oneline --decorate --graph --all\'\nglol=\'git log --graph --pretty=\'\\\'\'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset\'\\\'\' --abbrev-commit\'\nglola=\'git log --graph --pretty=\'\\\'\'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset\'\\\'\' --abbrev-commit --all\'\nglp=_git_log_prettily\nglum=\'git pull upstream master\'\ngm=\'git merge\'\ngma=\'git merge --abort\'\ngmom=\'git merge origin/master\'\ngmt=\'git mergetool --no-prompt\'\ngmtvim=\'git mergetool --no-prompt --tool=vimdiff\'\ngmum=\'git merge upstream/master\'\ngp=\'git push\'\ngpd=\'git push --dry-run\'\ngpoat=\'git push origin --all && git push origin --tags\'\ngpristine=\'git reset --hard && git clean -dfx\'\ngpsup=\'git push --set-upstream origin $(git_current_branch)\'\ngpu=\'git push upstream\'\ngpv=\'git push -v\'\ngr=\'git remote\'\ngra=\'git remote add\'\ngrb=\'git rebase\'\ngrba=\'git rebase --abort\'\ngrbc=\'git rebase --continue\'\ngrbi=\'git rebase -i\'\ngrbm=\'git rebase master\'\ngrbs=\'git rebase --skip\'\ngrep=\'grep  --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn}\'\ngrh=\'git reset HEAD\'\ngrhh=\'git reset HEAD --hard\'\ngrmv=\'git remote rename\'\ngrrm=\'git remote remove\'\ngrset=\'git remote set-url\'\ngrt=\'cd $(git rev-parse --show-toplevel || echo ".")\'\ngru=\'git reset --\'\ngrup=\'git remote update\'\ngrv=\'git remote -v\'\ngsb=\'git status -sb\'\ngsd=\'git svn dcommit\'\ngsi=\'git submodule init\'\ngsps=\'git show --pretty=short --show-signature\'\ngsr=\'git svn rebase\'\ngss=\'git status -s\'\ngst=\'git status\'\ngsta=\'git stash save\'\ngstaa=\'git stash apply\'\ngstc=\'git stash clear\'\ngstd=\'git stash drop\'\ngstl=\'git stash list\'\ngstp=\'git stash pop\'\ngsts=\'git stash show --text\'\ngsu=\'git submodule update\'\ngts=\'git tag -s\'\ngtv=\'git tag | sort -V\'\ngunignore=\'git update-index --no-assume-unchanged\'\ngunwip=\'git log -n 1 | grep -q -c "\\-\\-wip\\-\\-" && git reset HEAD~1\'\ngup=\'git pull --rebase\'\ngupv=\'git pull --rebase -v\'\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 -m "--wip-- [skip ci]"\'\nhistory=\'fc -l 1\'\nl=\'ls -lah\'\nla=\'ls -lAh\'\nll=\'ls -lh\'\nls=\'ls -G\'\nlsa=\'ls -lah\'\nmd=\'mkdir -p\'\nplease=sudo\npo=popd\npu=pushd\nrd=rmdir\nrun-help=man\nwhich-command=whence', 'TF_HISTORY': 'git --version\ncd ../PROJECT\ngit checkout -b ABC-7170\nexport THEFUCK_DEBUG=true\nwebstorm .\nexport THEFUCK_DEBUG=true\nnpm i && npm test\nnpm test\ngit commit -am "ABC-7170: Removing Reports and Traffic"\ngit push', 'PYTHONIOENCODING': 'utf-8', '_': '/usr/local/bin/thefuck', 'LC_ALL': 'C', 'LANG': 'C', 'GIT_TRACE': '1'}; is slow:  took: 0:00:00.011678
DEBUG: Importing rule: ag_literal; took: 0:00:00.001953
DEBUG: Importing rule: apt_get; took: 0:00:00.001903
DEBUG: Importing rule: apt_get_search; took: 0:00:00.000663
DEBUG: Importing rule: apt_invalid_operation; took: 0:00:00.001984
DEBUG: Importing rule: apt_list_upgradable; took: 0:00:00.000640
DEBUG: Importing rule: aws_cli; took: 0:00:00.000618
DEBUG: Importing rule: brew_cask_dependency; took: 0:00:00.001363
DEBUG: Importing rule: brew_install; took: 0:00:00.000398
DEBUG: Importing rule: brew_link; took: 0:00:00.000798
DEBUG: Importing rule: brew_uninstall; took: 0:00:00.000551
DEBUG: Importing rule: brew_unknown_command; took: 0:00:00.000365
DEBUG: Importing rule: brew_update_formula; took: 0:00:00.000519
DEBUG: Importing rule: cargo; took: 0:00:00.000312
DEBUG: Importing rule: cargo_no_command; took: 0:00:00.000519
DEBUG: Importing rule: cd_correction; took: 0:00:00.002360
DEBUG: Importing rule: cd_mkdir; took: 0:00:00.000786
DEBUG: Importing rule: cd_parent; took: 0:00:00.000414
DEBUG: Importing rule: chmod_x; took: 0:00:00.000315
DEBUG: Importing rule: composer_not_command; took: 0:00:00.000552
DEBUG: Importing rule: cp_omitting_directory; took: 0:00:00.001832
DEBUG: Importing rule: cpp11; took: 0:00:00.001145
DEBUG: Importing rule: dirty_untar; took: 0:00:00.002732
DEBUG: Importing rule: dirty_unzip; took: 0:00:00.004906
DEBUG: Importing rule: django_south_ghost; took: 0:00:00.000456
DEBUG: Importing rule: django_south_merge; took: 0:00:00.000533
DEBUG: Importing rule: dnf_no_such_command; took: 0:00:00.001633
DEBUG: Importing rule: docker_not_command; took: 0:00:00.001674
DEBUG: Importing rule: dry; took: 0:00:00.000387
DEBUG: Importing rule: fab_command_not_found; took: 0:00:00.001029
DEBUG: Importing rule: fix_alt_space; took: 0:00:00.000673
DEBUG: Importing rule: fix_file; took: 0:00:00.005706
DEBUG: Importing rule: gem_unknown_command; took: 0:00:00.001885
DEBUG: Importing rule: git_add; took: 0:00:00.001536
DEBUG: Importing rule: git_add_force; took: 0:00:00.001025
DEBUG: Importing rule: git_bisect_usage; took: 0:00:00.001068
DEBUG: Importing rule: git_branch_delete; took: 0:00:00.002742
DEBUG: Importing rule: git_branch_exists; took: 0:00:00.002380
DEBUG: Importing rule: git_branch_list; took: 0:00:00.001317
DEBUG: Importing rule: git_checkout; took: 0:00:00.001235
DEBUG: Importing rule: git_diff_no_index; took: 0:00:00.001688
DEBUG: Importing rule: git_diff_staged; took: 0:00:00.001217
DEBUG: Importing rule: git_fix_stash; took: 0:00:00.000645
DEBUG: Importing rule: git_flag_after_filename; took: 0:00:00.000513
DEBUG: Importing rule: git_help_aliased; took: 0:00:00.001172
DEBUG: Importing rule: git_not_command; took: 0:00:00.000825
DEBUG: Importing rule: git_pull; took: 0:00:00.000830
DEBUG: Importing rule: git_pull_clone; took: 0:00:00.000874
DEBUG: Importing rule: git_pull_uncommitted_changes; took: 0:00:00.000950
DEBUG: Importing rule: git_push; took: 0:00:00.001628
DEBUG: Importing rule: git_push_different_branch_names; took: 0:00:00.000986
DEBUG: Importing rule: git_push_force; took: 0:00:00.001306
DEBUG: Importing rule: git_push_pull; took: 0:00:00.001264
DEBUG: Importing rule: git_push_without_commits; took: 0:00:00.001502
DEBUG: Importing rule: git_rebase_merge_dir; took: 0:00:00.001173
DEBUG: Importing rule: git_rebase_no_changes; took: 0:00:00.000900
DEBUG: Importing rule: git_remote_delete; took: 0:00:00.000950
DEBUG: Importing rule: git_remote_seturl_add; took: 0:00:00.000808
DEBUG: Importing rule: git_rm_local_modifications; took: 0:00:00.000909
DEBUG: Importing rule: git_rm_recursive; took: 0:00:00.001552
DEBUG: Importing rule: git_rm_staged; took: 0:00:00.002338
DEBUG: Importing rule: git_stash; took: 0:00:00.000880
DEBUG: Importing rule: git_stash_pop; took: 0:00:00.000682
DEBUG: Importing rule: git_tag_force; took: 0:00:00.000575
DEBUG: Importing rule: git_two_dashes; took: 0:00:00.000521
DEBUG: Importing rule: go_run; took: 0:00:00.000685
DEBUG: Importing rule: gradle_no_task; took: 0:00:00.001141
DEBUG: Importing rule: gradle_wrapper; took: 0:00:00.000586
DEBUG: Importing rule: grep_arguments_order; took: 0:00:00.000524
DEBUG: Importing rule: grep_recursive; took: 0:00:00.000497
DEBUG: Importing rule: grunt_task_not_found; took: 0:00:00.000899
DEBUG: Importing rule: gulp_not_task; took: 0:00:00.001432
DEBUG: Importing rule: has_exists_script; took: 0:00:00.002056
DEBUG: Importing rule: heroku_multiple_apps; took: 0:00:00.001096
DEBUG: Importing rule: heroku_not_command; took: 0:00:00.000912
DEBUG: Importing rule: history; took: 0:00:00.000694
DEBUG: Importing rule: hostscli; took: 0:00:00.001905
DEBUG: Importing rule: ifconfig_device_not_found; took: 0:00:00.002550
DEBUG: Importing rule: java; took: 0:00:00.002102
DEBUG: Importing rule: javac; took: 0:00:00.001644
DEBUG: Importing rule: lein_not_task; took: 0:00:00.001127
DEBUG: Importing rule: ln_no_hard_link; took: 0:00:00.001174
DEBUG: Importing rule: ln_s_order; took: 0:00:00.001035
DEBUG: Importing rule: ls_all; took: 0:00:00.001384
DEBUG: Importing rule: ls_lah; took: 0:00:00.001171
DEBUG: Importing rule: man; took: 0:00:00.002010
DEBUG: Importing rule: man_no_space; took: 0:00:00.000621
DEBUG: Importing rule: mercurial; took: 0:00:00.000902
DEBUG: Importing rule: missing_space_before_subcommand; took: 0:00:00.000452
DEBUG: Importing rule: mkdir_p; took: 0:00:00.000814
DEBUG: Importing rule: mvn_no_command; took: 0:00:00.000959
DEBUG: Importing rule: mvn_unknown_lifecycle_phase; took: 0:00:00.000907
DEBUG: Importing rule: no_command; took: 0:00:00.001340
DEBUG: Importing rule: no_such_file; took: 0:00:00.000600
DEBUG: Importing rule: npm_missing_script; took: 0:00:00.002032
DEBUG: Importing rule: npm_run_script; took: 0:00:00.002694
DEBUG: Importing rule: npm_wrong_command; took: 0:00:00.002118
DEBUG: Importing rule: open; took: 0:00:00.003292
DEBUG: Importing rule: pacman; took: 0:00:00.002543
DEBUG: Importing rule: pacman_not_found; took: 0:00:00.000933
DEBUG: Importing rule: path_from_history; took: 0:00:00.000661
DEBUG: Importing rule: php_s; took: 0:00:00.001018
DEBUG: Importing rule: pip_unknown_command; took: 0:00:00.001305
DEBUG: Importing rule: port_already_in_use; took: 0:00:00.002355
DEBUG: Importing rule: prove_recursively; took: 0:00:00.000750
DEBUG: Importing rule: python_command; took: 0:00:00.000754
DEBUG: Importing rule: python_execute; took: 0:00:00.000810
DEBUG: Importing rule: quotation_marks; took: 0:00:00.000401
DEBUG: Importing rule: react_native_command_unrecognized; took: 0:00:00.001075
DEBUG: Importing rule: remove_trailing_cedilla; took: 0:00:00.000937
DEBUG: Importing rule: rm_dir; took: 0:00:00.001745
DEBUG: Importing rule: rm_root; took: 0:00:00.001479
DEBUG: Importing rule: scm_correction; took: 0:00:00.001681
DEBUG: Importing rule: sed_unterminated_s; took: 0:00:00.001358
DEBUG: Importing rule: sl_ls; took: 0:00:00.001164
DEBUG: Importing rule: ssh_known_hosts; took: 0:00:00.001467
DEBUG: Importing rule: sudo; took: 0:00:00.000443
DEBUG: Importing rule: sudo_command_from_user_path; took: 0:00:00.000878
DEBUG: Importing rule: switch_lang; took: 0:00:00.000542
DEBUG: Importing rule: systemctl; took: 0:00:00.001518
DEBUG: Importing rule: test.py; took: 0:00:00.001639
DEBUG: Importing rule: tmux; took: 0:00:00.001056
DEBUG: Importing rule: touch; took: 0:00:00.000832
DEBUG: Importing rule: tsuru_login; took: 0:00:00.000942
DEBUG: Importing rule: tsuru_not_command; took: 0:00:00.001271
DEBUG: Importing rule: unknown_command; took: 0:00:00.000449
DEBUG: Importing rule: vagrant_up; took: 0:00:00.000563
DEBUG: Importing rule: whois; took: 0:00:00.000800
DEBUG: Importing rule: workon_doesnt_exists; took: 0:00:00.000654
DEBUG: Importing rule: yarn_alias; took: 0:00:00.000962
DEBUG: Importing rule: yarn_command_not_found; took: 0:00:00.003494
DEBUG: Importing rule: yarn_command_replaced; took: 0:00:00.001441
DEBUG: Importing rule: yarn_help; took: 0:00:00.001262
DEBUG: Trying rule: path_from_history; took: 0:00:00.001408
DEBUG: Trying rule: dry; took: 0:00:00.000438
DEBUG: Trying rule: git_stash_pop; took: 0:00:00.000177
DEBUG: Trying rule: test.py; took: 0:00:00.000035
DEBUG: Trying rule: ag_literal; took: 0:00:00.000179
DEBUG: Trying rule: aws_cli; took: 0:00:00.000220
DEBUG: Trying rule: brew_cask_dependency; took: 0:00:00.000221
DEBUG: Trying rule: brew_install; took: 0:00:00.000011
DEBUG: Trying rule: brew_link; took: 0:00:00.000071
DEBUG: Trying rule: brew_uninstall; took: 0:00:00.000045
DEBUG: Trying rule: brew_unknown_command; took: 0:00:00.000006
DEBUG: Trying rule: brew_update_formula; took: 0:00:00.000034
DEBUG: Trying rule: cargo; took: 0:00:00.000007
DEBUG: Trying rule: cargo_no_command; took: 0:00:00.000032
DEBUG: Trying rule: cd_correction; took: 0:00:00.000027
DEBUG: Trying rule: cd_mkdir; took: 0:00:00.000023
DEBUG: Trying rule: cd_parent; took: 0:00:00.000005
DEBUG: Trying rule: chmod_x; took: 0:00:00.000007
DEBUG: Trying rule: composer_not_command; took: 0:00:00.000018
DEBUG: Trying rule: cp_omitting_directory; took: 0:00:00.000020
DEBUG: Trying rule: cpp11; took: 0:00:00.000020
DEBUG: Trying rule: dirty_untar; took: 0:00:00.000028
DEBUG: Trying rule: dirty_unzip; took: 0:00:00.000039
DEBUG: Trying rule: django_south_ghost; took: 0:00:00.000007
DEBUG: Trying rule: django_south_merge; took: 0:00:00.000005
DEBUG: Trying rule: docker_not_command; took: 0:00:00.000034
DEBUG: Trying rule: fab_command_not_found; took: 0:00:00.000038
DEBUG: Trying rule: fix_alt_space; took: 0:00:00.000012
DEBUG: Trying rule: fix_file; took: 0:00:00.000026
DEBUG: Trying rule: gem_unknown_command; took: 0:00:00.000032
DEBUG: Trying rule: git_add; took: 0:00:00.000032
DEBUG: Trying rule: git_add_force; took: 0:00:00.000045
DEBUG: Trying rule: git_bisect_usage; took: 0:00:00.000020
DEBUG: Trying rule: git_branch_delete; took: 0:00:00.000016
DEBUG: Trying rule: git_branch_exists; took: 0:00:00.000015
DEBUG: Trying rule: git_branch_list; took: 0:00:00.000020
DEBUG: Trying rule: git_checkout; took: 0:00:00.000016
DEBUG: Trying rule: git_diff_no_index; took: 0:00:00.000020
DEBUG: Trying rule: git_diff_staged; took: 0:00:00.000016
DEBUG: Trying rule: git_fix_stash; took: 0:00:00.000017
DEBUG: Trying rule: git_flag_after_filename; took: 0:00:00.000524
DEBUG: Trying rule: git_help_aliased; took: 0:00:00.000028
DEBUG: Trying rule: git_not_command; took: 0:00:00.000020
DEBUG: Trying rule: git_pull; took: 0:00:00.000017
DEBUG: Trying rule: git_pull_clone; took: 0:00:00.000017
DEBUG: Trying rule: git_pull_uncommitted_changes; took: 0:00:00.000015
DEBUG: Trying rule: git_push; took: 0:00:00.000016
git push --set-upstream origin ABC-7170 [enter/↑/↓/ctrl+c]
DEBUG: PYTHONIOENCODING: utf-8
DEBUG: Total took: 0:00:02.658146
Counting objects: 9, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (9/9), 754 bytes | 754.00 KiB/s, done.
Total 9 (delta 5), reused 0 (delta 0)
remote: Resolving deltas: 100% (5/5), completed with 5 local objects.
To github.com:ORG/PROJECT.git
 * [new branch]      ABC-7170 -> ABC-7170
Branch 'ABC-7170' set up to track remote branch 'ABC-7170' from 'origin'.
fuck:history: bad option: -s
ORG/PROJECT [ABC-7170] » 

If the bug only appears with a specific application, the output of that application and its version:

git version 2.16.3

Anything else you think is relevant:

tumblr_lsdptrzkpi1qh6cr0o4_r1_500

Also, I was able to reproduce this without using git, like lss correcting to ls (still got the error).

joaothallis commented 6 years ago

I have the same problem, it happens when I use zsh, in bash it does not have this problem.

scorphus commented 6 years ago

This is a duplicate of #783.

NOTE: Please always make sure you're using the latest version before posting to issues. [update: there was no version newer than 3.25 when this issue was first reported, though]

Version 3.25 does not correctly detect the shell in some cases. @joaothallis, what version is yours? Please upgrade to 3.27 and confirm the bug is gone.

joaothallis commented 6 years ago

The Fuck 3.25 using Python 3.6.5

scorphus commented 6 years ago

The Fuck 3.25 using Python 3.6.5

@joaothallis, what if you test with latest release?

joaothallis commented 6 years ago

I'm using the latest version of the distro, I'll uninstall and install it in another way to get the last one

João Thallis

Desenvolvedor de Software Stone Pagamentosjoaothallis.developer@gmail.com (21) 99982 2589 Rio de Janeiro https://joaothallis.github.io


From: Pablo Aguiar notifications@github.com Sent: Monday, September 24, 2018 5:06:19 AM To: nvbn/thefuck Cc: João Thallis | Stone; Mention Subject: Re: [nvbn/thefuck] fuck:history: bad option: -s (#797)

The Fuck 3.25 using Python 3.6.5

@joaothallishttps://github.com/joaothallis, what if you test with latest release?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/nvbn/thefuck/issues/797#issuecomment-423901107, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AYO3QHvf9-LySu0diTh0M_lWy2DSL4Htks5ueJJ7gaJpZM4S9ya1.

fluxsauce commented 6 years ago

Can no longer reproduce.

~ » lss
zsh: command not found: lss
~ » fuck
ls s [enter/↑/↓/ctrl+c]
Aborted
~ » fuck --version
The Fuck 3.27 using Python 3.7.0

I don't think this was a duplicate of #783 given the difference in error messages, but at the end of the day it's fixed which is 👍

Thanks!