diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 961c9f9..ca717dc 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,6 +1,6 @@ builds: - - main: ./cmd/kubectl-fzf/kubectl-fzf.go - binary: kubectl-fzf + - main: ./cmd/kubectl-fuzzy/kubectl-fuzzy.go + binary: kubectl-fuzzy goos: - windows - darwin @@ -11,7 +11,7 @@ builds: - CGO_ENABLED=0 - GO111MODULE=on ldflags: - - -s -w -X github.com/d-kuro/kubectl-fzf/pkg/cmd.Revision={{ .ShortCommit }} + - -s -w -X github.com/d-kuro/kubectl-fuzzy/pkg/cmd.Revision={{ .ShortCommit }} checksum: name_template: checksums.txt archives: @@ -27,4 +27,4 @@ changelog: release: github: owner: d-kuro - name: kubectl-fzf + name: kubectl-fuzzy diff --git a/Makefile b/Makefile index 9c96a8d..a7ec6a1 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -BINARY_NAME = kubectl-fzf -LDFLAGS = -ldflags="-s -w -X \"github.com/d-kuro/kubectl-fzf/pkg/cmd.Revision=$(shell git rev-parse --short HEAD)\"" +BINARY_NAME = kubectl-fuzzy +LDFLAGS = -ldflags="-s -w -X \"github.com/d-kuro/kubectl-fuzzy/pkg/cmd.Revision=$(shell git rev-parse --short HEAD)\"" export GO111MODULE=on @@ -10,5 +10,5 @@ test: lint: golangci-lint run install: - go install ./cmd/kubectl-fzf/ + go install ./cmd/kubectl-fuzzy/ diff --git a/README.md b/README.md index ee4074a..248d55e 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ -# kubectl-fzf +# kubectl-fuzzy -![](https://github.com/d-kuro/kubectl-fzf/workflows/Build/badge.svg) +![](https://github.com/d-kuro/kubectl-fuzzy/workflows/Build/badge.svg) Fuzzy Finder kubectl! -[![asciicast](https://asciinema.org/a/kMNLBIDAGLaNl6JcgJnUACCUr.svg)](https://asciinema.org/a/kMNLBIDAGLaNl6JcgJnUACCUr) +![](./docs/assets/kubectl-fuzzy.gif) ## Summary -`kubectl-fzf` is a kubectl plugin providing a fuzzy finder selector. +`kubectl-fuzzy` is a kubectl plugin providing a fuzzy finder selector. Uses [go-fuzzyfinder](https://github.com/ktr0731/go-fuzzyfinder), so there is no dependency on fzf binaries or anything else. > 📝 Notes @@ -20,14 +20,14 @@ Uses [go-fuzzyfinder](https://github.com/ktr0731/go-fuzzyfinder), so there is no ## Install ```shell -git clone https://github.com/d-kuro/kubectl-fzf.git -cd kubectl-fzf +git clone https://github.com/d-kuro/kubectl-fuzzy.git +cd kubectl-fuzzy make install ``` or -Please download the binaries from the [release page](https://github.com/d-kuro/kubectl-fzf/releases). +Please download the binaries from the [release page](https://github.com/d-kuro/kubectl-fuzzy/releases). ## Usage @@ -36,8 +36,8 @@ $ kubectl fzf -h Fuzzy Finder kubectl Usage: - kubectl-fzf [flags] - kubectl-fzf [command] + kubectl-fuzzy [flags] + kubectl-fuzzy [command] Available Commands: exec Selecting a Pod with the fuzzy finder and execute a command in a container @@ -46,9 +46,9 @@ Available Commands: version Show version Flags: - -h, --help help for kubectl-fzf + -h, --help help for kubectl-fuzzy -Use "kubectl-fzf [command] --help" for more information about a command. +Use "kubectl-fuzzy [command] --help" for more information about a command. ``` ## Support diff --git a/cmd/kubectl-fzf/kubectl-fzf.go b/cmd/kubectl-fuzzy/kubectl-fuzzy.go similarity index 80% rename from cmd/kubectl-fzf/kubectl-fzf.go rename to cmd/kubectl-fuzzy/kubectl-fuzzy.go index ca2e9bc..134c5f7 100644 --- a/cmd/kubectl-fzf/kubectl-fzf.go +++ b/cmd/kubectl-fuzzy/kubectl-fuzzy.go @@ -9,12 +9,12 @@ import ( "golang.org/x/sync/errgroup" "k8s.io/cli-runtime/pkg/genericclioptions" - "github.com/d-kuro/kubectl-fzf/pkg/cmd" - "github.com/d-kuro/kubectl-fzf/pkg/signal" + "github.com/d-kuro/kubectl-fuzzy/pkg/cmd" + "github.com/d-kuro/kubectl-fuzzy/pkg/signal" ) func main() { - flags := pflag.NewFlagSet("kubectl-fzf", pflag.ExitOnError) + flags := pflag.NewFlagSet("kubectl-fuzzy", pflag.ExitOnError) pflag.CommandLine = flags ctx := context.Background() diff --git a/docs/assets/kubectl-fuzzy.gif b/docs/assets/kubectl-fuzzy.gif new file mode 100644 index 0000000..bfc2bb5 Binary files /dev/null and b/docs/assets/kubectl-fuzzy.gif differ diff --git a/go.mod b/go.mod index d8bc8f3..1781a33 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/d-kuro/kubectl-fzf +module github.com/d-kuro/kubectl-fuzzy go 1.14 diff --git a/pkg/cmd/exec.go b/pkg/cmd/exec.go index 52c7040..74119a8 100644 --- a/pkg/cmd/exec.go +++ b/pkg/cmd/exec.go @@ -18,8 +18,8 @@ import ( "k8s.io/kubectl/pkg/util/interrupt" "k8s.io/kubectl/pkg/util/term" - "github.com/d-kuro/kubectl-fzf/pkg/fuzzyfinder" - "github.com/d-kuro/kubectl-fzf/pkg/kubernetes" + "github.com/d-kuro/kubectl-fuzzy/pkg/fuzzyfinder" + "github.com/d-kuro/kubectl-fuzzy/pkg/kubernetes" ) const ( diff --git a/pkg/cmd/logs.go b/pkg/cmd/logs.go index eebd3f1..7958c1c 100644 --- a/pkg/cmd/logs.go +++ b/pkg/cmd/logs.go @@ -14,8 +14,8 @@ import ( "k8s.io/cli-runtime/pkg/genericclioptions" coreclient "k8s.io/client-go/kubernetes/typed/core/v1" - "github.com/d-kuro/kubectl-fzf/pkg/fuzzyfinder" - "github.com/d-kuro/kubectl-fzf/pkg/kubernetes" + "github.com/d-kuro/kubectl-fuzzy/pkg/fuzzyfinder" + "github.com/d-kuro/kubectl-fuzzy/pkg/kubernetes" ) const ( diff --git a/pkg/cmd/root.go b/pkg/cmd/root.go index 98a41b8..0b087ee 100644 --- a/pkg/cmd/root.go +++ b/pkg/cmd/root.go @@ -8,7 +8,7 @@ import ( // NewCmdRoot return a cobra root command. func NewCmdRoot(streams genericclioptions.IOStreams) *cobra.Command { cmd := &cobra.Command{ - Use: "kubectl-fzf", + Use: "kubectl-fuzzy", Short: "Fuzzy Finder kubectl", SilenceUsage: true, RunE: func(c *cobra.Command, args []string) error { diff --git a/pkg/cmd/version.go b/pkg/cmd/version.go index 78ef8c8..14fffc3 100644 --- a/pkg/cmd/version.go +++ b/pkg/cmd/version.go @@ -7,7 +7,7 @@ import ( "github.com/spf13/cobra" ) -const Version = "v0.0.1" +const Version = "v1.0.0" var Revision = "development"