Skip to content

Commit dcb405a

Browse files
authored
Move documentation sources to site/content (#1428)
1 parent cbe4865 commit dcb405a

File tree

16 files changed

+33
-28
lines changed

16 files changed

+33
-28
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Cobra is a library for creating powerful modern CLI applications.
44

55
Cobra is used in many Go projects such as [Kubernetes](https://kubernetes.io/),
66
[Hugo](https://gohugo.io), and [GitHub CLI](https://github.com/cli/cli) to
7-
name a few. [This list](./projects_using_cobra.md) contains a more extensive list of projects using Cobra.
7+
name a few. [This list](site/content/projects_using_cobra.md) contains a more extensive list of projects using Cobra.
88

99
[![](https://img.shields.io/github/actions/workflow/status/spf13/cobra/test.yml?branch=main&longCache=true&label=Test&logo=github%20actions&logoColor=fff)](https://github.com/spf13/cobra/actions?query=workflow%3ATest)
1010
[![Go Reference](https://pkg.go.dev/badge/github.com/spf13/cobra.svg)](https://pkg.go.dev/github.com/spf13/cobra)
@@ -80,7 +80,7 @@ which maintains the same interface while adding POSIX compliance.
8080

8181
# Installing
8282
Using Cobra is easy. First, use `go get` to install the latest version
83-
of the library.
83+
of the library.
8484

8585
```
8686
go get -u github.com/spf13/cobra@latest
@@ -105,8 +105,8 @@ go install github.com/spf13/cobra-cli@latest
105105

106106
For complete details on using the Cobra-CLI generator, please read [The Cobra Generator README](https://github.com/spf13/cobra-cli/blob/main/README.md)
107107

108-
For complete details on using the Cobra library, please read the [The Cobra User Guide](user_guide.md).
108+
For complete details on using the Cobra library, please read the [The Cobra User Guide](site/content/user_guide.md).
109109

110110
# License
111111

112-
Cobra is released under the Apache 2.0 license. See [LICENSE.txt](https://github.com/spf13/cobra/blob/master/LICENSE.txt)
112+
Cobra is released under the Apache 2.0 license. See [LICENSE.txt](LICENSE.txt)

fish_completions.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

powershell_completions.md

Lines changed: 0 additions & 3 deletions
This file was deleted.
File renamed without changes.

shell_completions.md renamed to site/content/completions/_index.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ completion firstcommand secondcommand
416416
### Bash legacy dynamic completions
417417

418418
For backward compatibility, Cobra still supports its bash legacy dynamic completion solution.
419-
Please refer to [Bash Completions](bash_completions.md) for details.
419+
Please refer to [Bash Completions](bash.md) for details.
420420

421421
### Bash completion V2
422422

@@ -425,13 +425,13 @@ Cobra provides two versions for bash completion. The original bash completion (
425425

426426
A new V2 bash completion version is also available. This version can be used by calling `GenBashCompletionV2()` or
427427
`GenBashCompletionFileV2()`. The V2 version does **not** support the legacy dynamic completion
428-
(see [Bash Completions](bash_completions.md)) but instead works only with the Go dynamic completion
428+
(see [Bash Completions](bash.md)) but instead works only with the Go dynamic completion
429429
solution described in this document.
430430
Unless your program already uses the legacy dynamic completion solution, it is recommended that you use the bash
431431
completion V2 solution which provides the following extra features:
432432
- Supports completion descriptions (like the other shells)
433433
- Small completion script of less than 300 lines (v1 generates scripts of thousands of lines; `kubectl` for example has a bash v1 completion script of over 13K lines)
434-
- Streamlined user experience thanks to a completion behavior aligned with the other shells
434+
- Streamlined user experience thanks to a completion behavior aligned with the other shells
435435

436436
`Bash` completion V2 supports descriptions for completions. When calling `GenBashCompletionV2()` or `GenBashCompletionFileV2()`
437437
you must provide these functions with a parameter indicating if the completions should be annotated with a description; Cobra
@@ -448,7 +448,7 @@ show (show information of a chart)
448448
$ helm s[tab][tab]
449449
search show status
450450
```
451-
**Note**: Cobra's default `completion` command uses bash completion V2. If for some reason you need to use bash completion V1, you will need to implement your own `completion` command.
451+
**Note**: Cobra's default `completion` command uses bash completion V2. If for some reason you need to use bash completion V1, you will need to implement your own `completion` command.
452452
## Zsh completions
453453

454454
Cobra supports native zsh completion generated from the root `cobra.Command`.
@@ -482,7 +482,7 @@ search show status
482482
### Zsh completions standardization
483483

484484
Cobra 1.1 standardized its zsh completion support to align it with its other shell completions. Although the API was kept backward-compatible, some small changes in behavior were introduced.
485-
Please refer to [Zsh Completions](zsh_completions.md) for details.
485+
Please refer to [Zsh Completions](zsh.md) for details.
486486

487487
## fish completions
488488

@@ -535,7 +535,7 @@ search (search for a keyword in charts) show (show information of a chart) s
535535
536536
# With descriptions and Mode 'MenuComplete' The description of the current selected value will be displayed below the suggestions.
537537
$ helm s[tab]
538-
search show status
538+
search show status
539539
540540
search for a keyword in charts
541541

bash_completions.md renamed to site/content/completions/bash.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Generating Bash Completions For Your cobra.Command
22

3-
Please refer to [Shell Completions](shell_completions.md) for details.
3+
Please refer to [Shell Completions](_index.md) for details.
44

55
## Bash legacy dynamic completions
66

site/content/completions/fish.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
## Generating Fish Completions For Your cobra.Command
2+
3+
Please refer to [Shell Completions](_index.md) for details.
4+
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Generating PowerShell Completions For Your Own cobra.Command
2+
3+
Please refer to [Shell Completions](_index.md#powershell-completions) for details.

zsh_completions.md renamed to site/content/completions/zsh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Generating Zsh Completion For Your cobra.Command
22

3-
Please refer to [Shell Completions](shell_completions.md) for details.
3+
Please refer to [Shell Completions](_index.md) for details.
44

55
## Zsh completions standardization
66

doc/README.md renamed to site/content/docgen/_index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Documentation generation
22

3-
- [Man page docs](./man_docs.md)
4-
- [Markdown docs](./md_docs.md)
5-
- [Rest docs](./rest_docs.md)
6-
- [Yaml docs](./yaml_docs.md)
3+
- [Man page docs](man.md)
4+
- [Markdown docs](md.md)
5+
- [Rest docs](rest.md)
6+
- [Yaml docs](yaml.md)
77

88
## Options
99
### `DisableAutoGenTag`

0 commit comments

Comments
 (0)