Skip to content

Commit

Permalink
feat: fig autocomplete feature (sigstore#1360)
Browse files Browse the repository at this point in the history
Signed-off-by: Batuhan Apaydın <batuhan.apaydin@trendyol.com>
  • Loading branch information
developer-guy authored and mlieberman85 committed May 6, 2022
1 parent e448f18 commit 5aca6d6
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
27 changes: 27 additions & 0 deletions cmd/fig/fig.go
@@ -0,0 +1,27 @@
// Copyright 2022 The Sigstore Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package main

import (
"fmt"

"github.com/sigstore/cosign/cmd/cosign/cli"
genFigSpec "github.com/withfig/autocomplete-tools/packages/cobra"
)

func main() {
spec := genFigSpec.MakeFigSpec(cli.New())
fmt.Println(spec.ToTypescript())
}
1 change: 1 addition & 0 deletions go.mod
Expand Up @@ -54,6 +54,7 @@ require (
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/urfave/cli v1.22.5 // indirect
github.com/withfig/autocomplete-tools/packages/cobra v0.0.0-20220122124547-31d3821a6898
go.opentelemetry.io/contrib v1.3.0 // indirect
go.opentelemetry.io/proto/otlp v0.12.0 // indirect
k8s.io/kube-openapi v0.0.0-20220124234850-424119656bbf // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Expand Up @@ -2063,6 +2063,8 @@ github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17
github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0=
github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4=
github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI=
github.com/withfig/autocomplete-tools/packages/cobra v0.0.0-20220122124547-31d3821a6898 h1:2Z+iziYPiyWk5hVJ3EYLn/i33Tj5ukytaJA0Th9tbgc=
github.com/withfig/autocomplete-tools/packages/cobra v0.0.0-20220122124547-31d3821a6898/go.mod h1:cKObXQ6PVFO7bHUd5jpApXvMIt55Ewz7UdMiC05ONxI=
github.com/xanzy/go-gitlab v0.31.0/go.mod h1:sPLojNBn68fMUWSxIJtdVVIP8uSBYqesTfDUseX11Ug=
github.com/xanzy/go-gitlab v0.54.4 h1:3CFEdQ9O+bFx3BsyuOK0gqgLPwnT2rwnPOjudV07wTw=
github.com/xanzy/go-gitlab v0.54.4/go.mod h1:F0QEXwmqiBUxCgJm8fE9S+1veX4XC9Z4cfaAbqwk4YM=
Expand Down

0 comments on commit 5aca6d6

Please sign in to comment.