mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-01 06:37:46 +00:00
✨ First gh
completions (#706)
Hi! I could squeze some time to do the first `gh` completions. On the future I will add the subcommands 👍🏼 docs on https://cli.github.com/manual/
This commit is contained in:
parent
860a52a55d
commit
d88e68531d
1 changed files with 17 additions and 0 deletions
17
custom-completions/gh/gh-completions.nu
Normal file
17
custom-completions/gh/gh-completions.nu
Normal file
|
@ -0,0 +1,17 @@
|
|||
# ------------------ nu-complete commands ------------------
|
||||
|
||||
def "nu-complete gh" [] {
|
||||
^gh --help
|
||||
| lines
|
||||
| filter {|line| str starts-with " " }
|
||||
| skip 1
|
||||
| parse "{value}: {description}"
|
||||
| str trim
|
||||
}
|
||||
|
||||
|
||||
# ------------------ export extern commands ------------------
|
||||
export extern "gh" [
|
||||
command?: string@"nu-complete gh"
|
||||
--help # Show help for command
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue