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

✨ add more gh completions #713

Merged
merged 1 commit into from
Dec 22, 2023
Merged

Conversation

AucaCoyan
Copy link
Contributor

I added completions for

  • gh repo clone

    • gives you a list of your repositories on github
  • gh repo create

    • --ignore <tab> gives you a list of gitignores
    • --license <tab> gives you a list of licenses with their description
  • gh repo fork flags

Compared to previous PRs on gh completion, it's not much, but these features are those I use most of the time.
If you want to have completions of some particular subcommand, feel free to ask!

Samples

image

image

@AucaCoyan
Copy link
Contributor Author

AucaCoyan commented Dec 22, 2023

I also have a function to fork repos in a specific folder in my machine

# <repo: > fork the repo and clones it on ~/repos/
export def "fork this" [repo:string] {
    cd ~/repos
    print "⏬ fork + clone the repo"
    ^gh repo fork $repo --clone --default-branch-only 
}

fork this https://github.com/nushell/nu_scripts will make a fork of the repo in my user (AucaCoyan/nu_scripts) and clone it into the folder ~/repos/

Feel free to use it!

@fdncred
Copy link
Collaborator

fdncred commented Dec 22, 2023

I find myself doing gh pr checkout 1234 quite frequently in order to test PRs. I'm not sure what completions would look like for that but it may be helpful.

@fdncred fdncred merged commit 54b5a87 into nushell:main Dec 22, 2023
@AucaCoyan
Copy link
Contributor Author

I can look into it, thanks for the suggestion!

@AucaCoyan AucaCoyan deleted the add-gh-repo-completion branch December 22, 2023 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants