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

make the command parameters in the documentation pretty #169

Merged
merged 2 commits into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 5 additions & 22 deletions docs/nu-git-manager-sugar/git/gm-repo-bisect.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,11 @@ gm repo bisect --good $good --bad $bad --no-check $test
```

## Parameters
- parameter_name: test
- parameter_type: positional
- syntax_shape: closure()
- is_optional: false
- description: the code to run to check a given revision, should return a non-zero exit code for bad revisions
---
- parameter_name: good
- parameter_type: named
- syntax_shape: string
- is_optional: true
- description: the initial known "good" revision
---
- parameter_name: bad
- parameter_type: named
- syntax_shape: string
- is_optional: true
- description: the initial known "bad" revision
---
- parameter_name: no-check
- parameter_type: switch
- is_optional: true
- description: don't check if `--good` and `--bad` are indeed "good" and "bad"
- `test` <`closure()`>: the code to run to check a given revision, should return a non-zero exit code for bad revisions
- `--good` <`string`>: the initial known "good" revision
- `--bad` <`string`>: the initial known "bad" revision
- `--no-check` <`bool`>: don't check if `--good` and `--bad` are indeed "good" and "bad"


## Signatures
| input | output |
Expand Down
14 changes: 3 additions & 11 deletions docs/nu-git-manager-sugar/git/gm-repo-branch-wipe.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,9 @@ wipe a branch completely, i.e. both locally and remotely


## Parameters
- parameter_name: branch
- parameter_type: positional
- syntax_shape: string
- is_optional: false
- description: the branch to wipe
---
- parameter_name: remote
- parameter_type: positional
- syntax_shape: string
- is_optional: false
- description: the remote to push to
- `branch` <`string`>: the branch to wipe
- `remote` <`string`>: the remote to push to


## Signatures
| input | output |
Expand Down
6 changes: 2 additions & 4 deletions docs/nu-git-manager-sugar/git/gm-repo-branches.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ gm repo branches --clean
```

## Parameters
- parameter_name: clean
- parameter_type: switch
- is_optional: true
- description: clean all dangling branches
- `--clean` <`bool`>: clean all dangling branches


## Signatures
| input | output |
Expand Down
15 changes: 3 additions & 12 deletions docs/nu-git-manager-sugar/git/gm-repo-compare.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,9 @@ compare the changes between two revisions, from a target to the "head"


## Parameters
- parameter_name: target
- parameter_type: positional
- syntax_shape: string
- is_optional: false
- description: the target to compare from
---
- parameter_name: head
- parameter_type: named
- syntax_shape: string
- is_optional: true
- description: the "head" to use for the comparison
- parameter_default: HEAD
- `target` <`string`>: the target to compare from
- `--head` <`string`> = `HEAD`: the "head" to use for the comparison


## Signatures
| input | output |
Expand Down
25 changes: 4 additions & 21 deletions docs/nu-git-manager-sugar/git/gm-repo-fetch-branch.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,10 @@ fetch a remote branch locally, without pulling down the whole remote


## Parameters
- parameter_name: remote
- parameter_type: positional
- syntax_shape: completable<string>
- is_optional: false
- description: the branch to fetch
- custom_completion: get-remotes
---
- parameter_name: branch
- parameter_type: positional
- syntax_shape: completable<string>
- is_optional: false
- description: the remote to fetch the branch from
- custom_completion: get-branches
---
- parameter_name: strategy
- parameter_type: named
- syntax_shape: completable<string>
- is_optional: true
- description: the merge strategy to use
- custom_completion: get-strategies
- parameter_default: none
- `remote` <`string@get-remotes`>: the branch to fetch
- `branch` <`string@get-branches`>: the remote to fetch the branch from
- `--strategy` <`string@get-strategies`> = `none`: the merge strategy to use


## Signatures
| input | output |
Expand Down
8 changes: 2 additions & 6 deletions docs/nu-git-manager-sugar/git/gm-repo-get-commit.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,8 @@ gm repo get commit main
```

## Parameters
- parameter_name: revision
- parameter_type: positional
- syntax_shape: string
- is_optional: true
- description: the revision to get the hash of
- parameter_default: HEAD
- `revision?` <`string`> = `HEAD`: the revision to get the hash of


## Signatures
| input | output |
Expand Down
14 changes: 3 additions & 11 deletions docs/nu-git-manager-sugar/git/gm-repo-is-ancestor.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,9 @@ false
```

## Parameters
- parameter_name: a
- parameter_type: positional
- syntax_shape: string
- is_optional: false
- description: the base commit-ish revision
---
- parameter_name: b
- parameter_type: positional
- syntax_shape: string
- is_optional: false
- description: the *head* commit-ish revision
- `a` <`string`>: the base commit-ish revision
- `b` <`string`>: the *head* commit-ish revision


## Signatures
| input | output |
Expand Down
7 changes: 2 additions & 5 deletions docs/nu-git-manager-sugar/git/gm-repo-ls.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@ get some information about a repo


## Parameters
- parameter_name: repo
- parameter_type: positional
- syntax_shape: path
- is_optional: true
- description: the path to the repo (defaults to `.`)
- `repo?` <`path`>: the path to the repo (defaults to `.`)


## Signatures
| input | output |
Expand Down
7 changes: 2 additions & 5 deletions docs/nu-git-manager-sugar/git/gm-repo-query.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,8 @@ gm repo query diffs
```

## Parameters
- parameter_name: table
- parameter_type: positional
- syntax_shape: completable<string>
- is_optional: false
- custom_completion: git-query-tables
- `table` <`string@git-query-tables`>:


## Signatures
| input | output |
Expand Down
15 changes: 3 additions & 12 deletions docs/nu-git-manager-sugar/git/prompt/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,9 @@ export-env {
```

## Parameters
- parameter_name: indicators
- parameter_type: named
- syntax_shape: record<plain: string, vi: record<insert: string, normal: string>>
- is_optional: true
- parameter_default: plain: > , vi: insert: : , normal: >
---
- parameter_name: duration-threshold
- parameter_type: named
- syntax_shape: duration
- is_optional: true
- description: the threshold above which the command duration is shown
- parameter_default: 1sec
- `--indicators` <`record<plain: string, vi: record<insert: string, normal: string>>`> = `{plain: > , vi: {insert: : , normal: > }}`:
- `--duration-threshold` <`duration`> = `1sec`: the threshold above which the command duration is shown


## Signatures
| input | output |
Expand Down
27 changes: 5 additions & 22 deletions docs/nu-git-manager-sugar/github/gm-gh-query-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,11 @@ you shall not rebase in the middle of a PR review nor close other's review threa
```

## Parameters
- parameter_name: end_point
- parameter_type: positional
- syntax_shape: string
- is_optional: false
- description: the end point in the GitHub API to query
---
- parameter_name: page-size
- parameter_type: named
- syntax_shape: int
- is_optional: true
- description: the size of each page
- parameter_default: 100
---
- parameter_name: no-paginate
- parameter_type: switch
- is_optional: true
- description: do not paginate the API, useful when getting a single record
---
- parameter_name: no-gh
- parameter_type: switch
- is_optional: true
- description: force to use `http get` instead of `gh`
- `end_point` <`string`>: the end point in the GitHub API to query
- `--page-size` <`int`> = `100`: the size of each page
- `--no-paginate` <`bool`>: do not paginate the API, useful when getting a single record
- `--no-gh` <`bool`>: force to use `http get` instead of `gh`


## Signatures
| input | output |
Expand Down
21 changes: 4 additions & 17 deletions docs/nu-git-manager-sugar/github/gm-gh-query-releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,10 @@ gm gh query-releases "nushell/nushell"
```

## Parameters
- parameter_name: repo
- parameter_type: positional
- syntax_shape: string
- is_optional: false
- description: the GitHub repository to query the releases of
---
- parameter_name: page-size
- parameter_type: named
- syntax_shape: int
- is_optional: true
- description: the size of each page
- parameter_default: 100
---
- parameter_name: no-gh
- parameter_type: switch
- is_optional: true
- description: force to use `http get` instead of `gh`
- `repo` <`string`>: the GitHub repository to query the releases of
- `--page-size` <`int`> = `100`: the size of each page
- `--no-gh` <`bool`>: force to use `http get` instead of `gh`


## Signatures
| input | output |
Expand Down
13 changes: 3 additions & 10 deletions docs/nu-git-manager-sugar/github/gm-gh-query-user.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,9 @@ gm gh query-user amtoine | get avatar_url | http get $in | save --force amtoine.
```

## Parameters
- parameter_name: user
- parameter_type: positional
- syntax_shape: string
- is_optional: false
- description: the user to query information about
---
- parameter_name: no-gh
- parameter_type: switch
- is_optional: true
- description: force to use `http get` instead of `gh`
- `user` <`string`>: the user to query information about
- `--no-gh` <`bool`>: force to use `http get` instead of `gh`


## Signatures
| input | output |
Expand Down
6 changes: 2 additions & 4 deletions docs/nu-git-manager/gm-clean.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ gm clean --list
```

## Parameters
- parameter_name: list
- parameter_type: switch
- is_optional: true
- description: only list without cleaning
- `--list` <`bool`>: only list without cleaning


## Signatures
| input | output |
Expand Down
50 changes: 8 additions & 42 deletions docs/nu-git-manager/gm-clone.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,48 +30,14 @@ gm clone https://github.com/neovim/neovim --depth 1
```

## Parameters
- parameter_name: url
- parameter_type: positional
- syntax_shape: string
- is_optional: false
- description: the URL to the repository to clone, supports HTTPS and SSH links, as well as references ending in `.git` or starting with `git@`
---
- parameter_name: remote
- parameter_type: named
- syntax_shape: string
- is_optional: true
- description: the name of the remote to setup
- parameter_default: origin
---
- parameter_name: ssh
- parameter_type: switch
- is_optional: true
- description: setup the remote to use the SSH protocol both to FETCH and to PUSH
---
- parameter_name: fetch
- parameter_type: named
- syntax_shape: completable<string>
- is_optional: true
- description: setup the FETCH protocol explicitely, will overwrite `--ssh` for FETCH
- custom_completion: git-protocols
---
- parameter_name: push
- parameter_type: named
- syntax_shape: completable<string>
- is_optional: true
- description: setup the PUSH protocol explicitely, will overwrite `--ssh` for PUSH
- custom_completion: git-protocols
---
- parameter_name: bare
- parameter_type: switch
- is_optional: true
- description: clone the repository as a "bare" project
---
- parameter_name: depth
- parameter_type: named
- syntax_shape: int
- is_optional: true
- description: the depth at which to clone the repository
- `url` <`string`>: the URL to the repository to clone, supports HTTPS and SSH links, as well as references ending in `.git` or starting with `git@`
- `--remote` <`string`> = `origin`: the name of the remote to setup
- `--ssh` <`bool`>: setup the remote to use the SSH protocol both to FETCH and to PUSH
- `--fetch` <`string@git-protocols`>: setup the FETCH protocol explicitely, will overwrite `--ssh` for FETCH
- `--push` <`string@git-protocols`>: setup the PUSH protocol explicitely, will overwrite `--ssh` for PUSH
- `--bare` <`bool`>: clone the repository as a "bare" project
- `--depth` <`int`>: the depth at which to clone the repository


## Signatures
| input | output |
Expand Down
6 changes: 2 additions & 4 deletions docs/nu-git-manager/gm-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@ cd (gm list --full-path | input list)
```

## Parameters
- parameter_name: full-path
- parameter_type: switch
- is_optional: true
- description: show the full path instead of only the "owner + group + repo" name
- `--full-path` <`bool`>: show the full path instead of only the "owner + group + repo" name


## Signatures
| input | output |
Expand Down
19 changes: 4 additions & 15 deletions docs/nu-git-manager/gm-remove.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,10 @@ gm remove amtoine/nu-git-manager --no-confirm
```

## Parameters
- parameter_name: pattern
- parameter_type: positional
- syntax_shape: string
- is_optional: true
- description: a pattern to restrict the choices
---
- parameter_name: fuzzy
- parameter_type: switch
- is_optional: true
- description: remove after fuzzy-finding the repo(s) to clean
---
- parameter_name: no-confirm
- parameter_type: switch
- is_optional: true
- description: do not ask for confirmation: useful in scripts but requires a single match
- `pattern?` <`string`>: a pattern to restrict the choices
- `--fuzzy` <`bool`>: remove after fuzzy-finding the repo(s) to clean
- `--no-confirm` <`bool`>: do not ask for confirmation: useful in scripts but requires a single match


## Signatures
| input | output |
Expand Down
Loading
Loading