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
2 changes: 1 addition & 1 deletion docs/cmd/kn_plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ kn plugin [flags]
### SEE ALSO

* [kn](kn.md) - Knative client
* [kn plugin list](kn_plugin_list.md) - List all visible plugin executables
* [kn plugin list](kn_plugin_list.md) - List plugins

13 changes: 7 additions & 6 deletions docs/cmd/kn_plugin_list.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
## kn plugin list

List all visible plugin executables
List plugins

### Synopsis

List all visible plugin executables.
List all installed plugins.

Available plugin files are those that are:
Available plugins are those that are:
- executable
- begin with "kn-
- anywhere on the path specified in Kn's config pluginDir variable, which:
* can be overridden with the --plugin-dir flag
- begin with "kn-"
- Kn's plugin directory ~/.kn/plugins
- Anywhere in the execution $PATH (if lookupInPath config variable is enabled)

```
kn plugin list [flags]
Expand All @@ -23,6 +23,7 @@ kn plugin list [flags]
--lookup-plugins-in-path look for kn plugins in $PATH
--name-only If true, display only the binary name of each plugin, rather than its full path
--plugins-dir string kn plugins directory (default "~/.kn/plugins")
--verbose verbose output
```

### Options inherited from parent commands
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ require (
github.com/mitchellh/go-homedir v1.1.0
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/pkg/errors v0.8.1 // indirect
github.com/pkg/errors v0.8.1
github.com/spf13/cobra v0.0.3
github.com/spf13/pflag v1.0.3
github.com/spf13/viper v1.3.1
Expand Down
102 changes: 0 additions & 102 deletions pkg/kn/commands/plugin/path_verifier.go

This file was deleted.

112 changes: 0 additions & 112 deletions pkg/kn/commands/plugin/path_verifier_test.go

This file was deleted.

4 changes: 3 additions & 1 deletion pkg/kn/commands/plugin/plugin_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import (
"path/filepath"
"strings"
"syscall"

"github.com/mitchellh/go-homedir"
)

// PluginHandler is capable of parsing command line arguments
Expand Down Expand Up @@ -62,7 +64,7 @@ func (h *DefaultPluginHandler) Lookup(name string) (string, bool) {
pluginPath := fmt.Sprintf("%s-%s", prefix, name)

// Try to find plugin in pluginsDir
pluginDir, err := ExpandPath(h.PluginsDir)
pluginDir, err := homedir.Expand(h.PluginsDir)
if err != nil {
return "", false
}
Expand Down
Loading