Skip to content

Commit

Permalink
removed --spec flag
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Mar 29, 2023
1 parent 4ad66c1 commit fdb2c09
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 33 deletions.
31 changes: 0 additions & 31 deletions cmd/carapace/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,29 +48,7 @@ var rootCmd = &cobra.Command{
tcsh: eval `+"`"+`carapace _chmod tcsh`+"`"+`
xonsh: exec($(carapace chmod xonsh))
zsh: source <(carapace chmod zsh)
Bridge completion:
bash: source <(carapace --bridge vault/posener)
elvish: eval (carapace --bridge vault/posener|slurp)
fish: carapace --bridge vault/posener | source
nushell: carapace --bridge vault/posener
oil: source <(carapace --bridge vault/posener)
powershell: carapace --bridge vault/posener | Out-String | Invoke-Expression
tcsh: eval `+"`"+`carapace --bridge vault/posener`+"`"+`
xonsh: exec($(carapace --bridge vault/posener))
zsh: source <(carapace --bridge vault/posener)
Spec completion:
bash: source <(carapace --spec example.yaml)
elvish: eval (carapace --spec example.yaml|slurp)
fish: carapace --spec example.yaml | source
oil: source <(carapace --spec example.yaml)
nushell: carapace --spec example.yaml
powershell: carapace --spec example.yaml | Out-String | Invoke-Expression
tcsh: eval `+"`"+`carapace --spec example.yaml`+"`"+`
xonsh: exec($(carapace --spec example.yaml))
zsh: source <(carapace --spec example.yaml)
Style:
set: carapace --style 'carapace.Value=bold,magenta'
clear: carapace --style 'carapace.Description='
Expand All @@ -85,15 +63,6 @@ var rootCmd = &cobra.Command{
Run: func(cmd *cobra.Command, args []string) {
// since flag parsing is disabled do this manually
switch args[0] {
case "--spec":
if len(args) > 1 {
out, err := specCompletion(args[1], args[2:]...)
if err != nil {
fmt.Fprintln(cmd.ErrOrStderr(), err.Error())
return
}
fmt.Fprintln(cmd.OutOrStdout(), out)
}
case "--macros":
if len(args) > 1 {
printMacro(args[1])
Expand Down
2 changes: 0 additions & 2 deletions completers/carapace_completer/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ func flagCmd(args []string) *cobra.Command {
cmd.Flags().String("run", "", "run spec")
cmd.Flags().Bool("schema", false, "json schema for spec files")
cmd.Flags().String("scrape", "", "scrape spec to go code")
cmd.Flags().String("spec", "", "spec completion")
cmd.Flags().String("style", "", "set style")
cmd.Flags().BoolP("version", "v", false, "version for carapace")

Expand Down Expand Up @@ -68,7 +67,6 @@ func flagCmd(args []string) *cobra.Command {
}),
"run": carapace.ActionFiles(".yaml"),
"scrape": carapace.ActionFiles(".yaml"),
"spec": carapace.ActionFiles(".yaml"),
"style": carapace.ActionStyleConfig().NoSpace(),
})

Expand Down

0 comments on commit fdb2c09

Please sign in to comment.