-
Notifications
You must be signed in to change notification settings - Fork 222
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ add completion to
gh pr checkout <tab>
(#714)
Hi! I added completion to `gh pr checkout <tab>` It grabs the first 30 open prs ![image](https://github.com/nushell/nu_scripts/assets/30557287/755fe63b-dc22-49ef-89c3-27e1ba115d68) ### I tried some things `gh pr checkout` can accept - a pr number - a url - or a branch before I tried - Incrementing the limit of PRs from 30 (default) to 50, but I takes considerably longer to query, and _gotta go fast_ - using the `extra` field in autocomplete [`Suggestion`](https://github.com/nushell/reedline/blob/a4bfaa512be8b7214b80c63327930155da86978a/src/completion/base.rs#L58). But I couldn't make it - tried to use the `title` in the `value`, like this below, but when you select a row, it pastes the title into the cli, so `gh pr checkout <title>` doesn't make sense ![image](https://github.com/nushell/nu_scripts/assets/30557287/1c5caf7c-4653-49ba-afc2-ec8ba155b00f) So, selecting the pr number is the closest I can get to
- Loading branch information
Showing
1 changed file
with
37 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters