mirror of
https://github.com/nushell/nu_scripts.git
synced 2024-10-26 22:08:03 +03:00
703b551495
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`](
|
||
---|---|---|
.. | ||
ani-cli | ||
auto-generate | ||
bitwarden-cli | ||
btm | ||
cargo | ||
gh | ||
git | ||
glow | ||
just | ||
make | ||
man | ||
mask | ||
nano | ||
nix | ||
npm | ||
pass | ||
pdm | ||
pnpm | ||
poetry | ||
reflector | ||
rustup | ||
scoop | ||
tealdeer | ||
toipe | ||
typst | ||
winget | ||
yarn | ||
zellij | ||
README.md |
Custom completions
This current directory provides custom completions. They can be used by importing their exported commands via:
use path/to/<command>/<command>-completions.nu *
# or
source path/to/<command>/<command>-completions.nu
# without the `*` at the end
With path/to/<command>
being either the relative path of the file to your current working directory or its absolute path.
Bear in mind that if you import the use <path> *
, it is important that you don't name a function with the same name of the file
# file: rustup.nu
export extern rustup [
...args
]
use ./rustup.nu *
won't work here