Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fuck --yeah doesn't work in fish shell #899

@muli

Description

@muli

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.28 using Python 3.7.2 and Fish Shell 3.0.0

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

macOS 10.14.3 (Mojave)

How to reproduce the bug:

➜  some_git_repo git:(some_branch) ✗ git push
fatal: The current branch some_branch has no upstream branch.
To push the current branch and set the remote as upstream, use

    git push --set-upstream origin some_branch

➜  some_git_repo git:(some_branch) ✗ fuck --yeah
git push --set-upstream origin some_branch [enter/↑/↓/ctrl+c]

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

➜  some_get_repo git:(some_branch) fuck --yeah
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,
 '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/muli/.config/thefuck'),
 'wait_command': 3,
 'wait_slow_command': 15}
DEBUG: Received output: 08:57:41.011692 git.c:415               trace: built-in: git push
fatal: The current branch some_branch has no upstream branch.
To push the current branch and set the remote as upstream, use

    git push --set-upstream origin some_branch

Obviously, require_confirmation should be false in this case.

Anything else you think is relevant:

If I switch to zsh, all works well. The problem is only with fish. My guess is that for some reason, the --yeah argument is not passed to fuck, hence require_confirmation is True.

Thank you!

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions