Skip to content

Commit

Permalink
chore: update cobra version and deprecated command
Browse files Browse the repository at this point in the history
PatrickMenoti committed Nov 17, 2022
1 parent 065d37d commit 407e6e4
Showing 4 changed files with 15 additions and 67 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -107,7 +107,7 @@ plugins=(zsh-autosuggestions)
If you have other plugins, just add zsh-zutosuggestions to the end.


> Whether you chose to activate autocomplete globally or for aziobncli only, the steps of each section should only be run once. After that, autocomplete will work everytime you open a new terminal.
> Whether you chose to activate autocomplete globally or for azioncli only, the steps of each section should only be run once. After that, autocomplete will work every time you open a new terminal.

## Dependencies bash

@@ -165,10 +165,10 @@ echo "source /etc/profile.d/bash_completion.sh" >> ~/.bashrc
```
----

> Whether you chose to activate autocomplete globally or for aziobncli only, the steps of each section should only be run once. After that, autocomplete will work everytime you open a new terminal.
> Whether you chose to activate autocomplete globally or for azioncli only, the steps of each section should only be run once. After that, autocomplete will work every time you open a new terminal.

## Dependencies fish
Run
Run the command below once
```shell
echo "azioncli completion fish | source" >> ~/.config/fish/config.fish
```
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ go 1.17
require (
github.com/aziontech/azionapi-go-sdk v0.20.0
github.com/go-git/go-git/v5 v5.4.2
github.com/spf13/cobra v1.3.0
github.com/spf13/cobra v1.6.1
github.com/spf13/viper v1.14.0
github.com/tidwall/gjson v1.14.3
github.com/tidwall/sjson v1.2.5
@@ -14,7 +14,7 @@ require (
require (
github.com/MakeNowJust/heredoc v1.0.0
github.com/golang/protobuf v1.5.2 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.1
golang.org/x/net v0.0.0-20221014081412-f15817d10f9b // indirect
@@ -27,7 +27,7 @@ require (
github.com/Microsoft/go-winio v0.4.16 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 // indirect
github.com/acomagu/bufpipe v1.0.3 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emirpasic/gods v1.12.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
65 changes: 6 additions & 59 deletions go.sum

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions pkg/cmd/completion/completion.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package completion

import (
"os"

"github.com/aziontech/azion-cli/pkg/cmdutil"
"github.com/spf13/cobra"
"os"
)

func NewCmd(f *cmdutil.Factory) *cobra.Command {
@@ -13,7 +14,7 @@ func NewCmd(f *cmdutil.Factory) *cobra.Command {
Long: "To load completions",
DisableFlagsInUseLine: true,
ValidArgs: []string{"bash", "zsh", "fish", "powershell"},
Args: cobra.ExactValidArgs(1),
Args: cobra.MatchAll(cobra.ExactArgs(1)),
Annotations: map[string]string{
"Category": "skip",
},

0 comments on commit 407e6e4

Please sign in to comment.