Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
muli opened this issue Apr 4, 2019 · 3 comments
Closed

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

muli opened this issue Apr 4, 2019 · 3 comments
Assignees
Labels
Milestone

Comments

@muli
Copy link

muli commented Apr 4, 2019

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!

@scorphus
Copy link
Collaborator

scorphus commented Apr 4, 2019

Thanks for reporting, @muli! Support to -y/--yeah for Fish Shell is on its way.

Fish Shell is a bit behind Bash (and ZSH). I'll be changing that as time allows.

@scorphus scorphus added this to the 3.29 milestone Apr 4, 2019
@scorphus scorphus added the fish label Apr 4, 2019
@scorphus scorphus self-assigned this Apr 4, 2019
scorphus added a commit to scorphus/thefuck that referenced this issue Apr 4, 2019
@muli
Copy link
Author

muli commented Apr 4, 2019

Awesome, thanks for the quick response! Looking forward to the new version :)

@muli
Copy link
Author

muli commented Jun 10, 2019

It's worth mentioning that in order to make it work, you should re-run thefuck --alias and copy the result into the config.fish file (or into the auto-loaded function file you created, e.g., fuck.fish), since this is essentially the fix.

Cheers!

@muli muli closed this as completed Jun 10, 2019
stephanos pushed a commit to bungeebyte/thefuck that referenced this issue Jun 10, 2020
riley-martine pushed a commit to riley-martine/thefuck that referenced this issue Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants