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

feat: Enable Fish's git <command> completion on simple wrappers #52

Merged
merged 1 commit into from
Jun 14, 2023

Conversation

SirWrexes
Copy link
Contributor

Goal: This patch aims to bring Fish's awesome completion to everyday git wrappers that pass $argv to the command they call.

Motivation: I love this plugin and it's part of the first few things I always put on all of my fresh Linux installs, but it has always bugged me how it doesn't provide users with git <command> completions on some shorthands that I use daily and accept any of <command>'s flags/options. Fish's function directive has an option to specify that it's a wrapper, I figured it was only some of Gitnow's wrappers make use of it.

Affected commands:

  • stage -> wraps git add
  • unstage -> wraps git reset
  • show -> wraps git show
  • commit -> wraps git commit
  • push -> wraps git push
  • pull -> wraps git pull

Have a good day, and thanks for the excellent workflow QOL you've provided me and many users with!

PS: Seems my automatic whitespace cleanup found a trailing space at line 376... Oh well. ¯\_(ツ)_/¯

This patch aims to bring Fish's awesome completion to everyday git
wrappers that pass `$argv` to the command they call.

Affected commands:
  - `stage`   -> wraps `git add`
  - `unstage` -> wraps `git reset`
  - `show`    -> wraps `git show`
  - `commit`  -> wraps `git commit`
  - `push`    -> wraps `git push`
  - `pull`    -> wraps `git pull`
@joseluisq
Copy link
Owner

joseluisq commented Jun 14, 2023

Good idea!
In fact, that's very useful though.
And since most of the commands are wrappers then I think it makes sense to append -w to all wrapper commands like state, etc.

@joseluisq joseluisq self-requested a review June 14, 2023 12:49
@joseluisq joseluisq added the enhancement New feature or request label Jun 14, 2023
Copy link
Owner

@joseluisq joseluisq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I forgot that not all wrapper commands are accepting git options so the PR looks fine to me. 👍

@joseluisq joseluisq merged commit 5dab658 into joseluisq:master Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants