Skip to content
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
6 changes: 5 additions & 1 deletion cmd/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ const (
$ brew install bash-completion
$ source $(brew --prefix)/etc/bash_completion
$ devspace completion bash > ~/.devspace-completion # for bash users
$ devspace completion fish > ~/.devspace-completion # for fish users
$ devspace completion zsh > ~/.devspace-completion # for zsh users
$ source ~/.devspace-completion
Ubuntu:
$ apt-get install bash-completion
$ source /etc/bash-completion
$ source <(devspace completion bash) # for bash users
$ devspace completion fish | source # for fish users
$ source <(devspace completion zsh) # for zsh users

Additionally, you may want to output the completion to a file and source in your .bashrc
Expand All @@ -42,7 +44,7 @@ func NewCompletionCmd() *cobra.Command {
}
return cobra.OnlyValidArgs(cmd, args)
},
ValidArgs: []string{"bash", "zsh"},
ValidArgs: []string{"bash", "fish", "zsh"},
Short: "Outputs shell completion for the given shell (bash or zsh)",
Long: longDescription,
RunE: completion,
Expand All @@ -53,6 +55,8 @@ func completion(cmd *cobra.Command, args []string) error {
switch args[0] {
case "bash":
return rootCmd(cmd).GenBashCompletion(os.Stdout)
case "fish":
return rootCmd(cmd).GenFishCompletion(os.Stdout, true)
case "zsh":
err := rootCmd(cmd).GenZshCompletion(os.Stdout)
if err != nil {
Expand Down
18 changes: 15 additions & 3 deletions docs/pages/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@ title: "devspace --help"
sidebar_label: devspace
---

## devspace

Welcome to the DevSpace!

### Synopsis
```

DevSpace accelerates developing, deploying and debugging applications with Docker and Kubernetes. Get started by running the init command in one of your projects:

devspace init
```

### Global Flags
### Options

```
--debug Prints the stack trace if an error occurs
--disable-profile-activation If true will ignore all profile activations
Expand All @@ -25,3 +29,11 @@ DevSpace accelerates developing, deploying and debugging applications with Docke
-s, --switch-context Switches and uses the last kube context and namespace that was used to deploy the DevSpace project
--var strings Variables to override during execution (e.g. --var=MYVAR=MYVALUE)
```

```

```


## Flags
## Global & Inherited Flags
2 changes: 2 additions & 0 deletions docs/pages/cli/devspace_completion.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ Outputs shell completion for the given shell (bash or zsh)
$ brew install bash-completion
$ source $(brew --prefix)/etc/bash_completion
$ devspace completion bash > ~/.devspace-completion # for bash users
$ devspace completion fish > ~/.devspace-completion # for fish users
$ devspace completion zsh > ~/.devspace-completion # for zsh users
$ source ~/.devspace-completion
Ubuntu:
$ apt-get install bash-completion
$ source /etc/bash-completion
$ source <(devspace completion bash) # for bash users
$ devspace completion fish | source # for fish users
$ source <(devspace completion zsh) # for zsh users

Additionally, you may want to output the completion to a file and source in your .bashrc
Expand Down