-
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1639 from rsteube/remove-execute-funcs
replace execute funcs with bridge action
- Loading branch information
Showing
26 changed files
with
304 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,27 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace-bin/completers/aplay_completer/cmd" | ||
"github.com/rsteube/carapace" | ||
"github.com/rsteube/carapace-bridge/pkg/actions/bridge" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
/** | ||
Description for go:generate | ||
Use: "arecord", | ||
Short: "command-line sound recorder and player for ALSA soundcard driver", | ||
Long: "https://linux.die.net/man/1/arecord", | ||
*/ | ||
var rootCmd = &cobra.Command{ | ||
Use: "arecord", | ||
Short: "command-line sound recorder and player for ALSA soundcard driver", | ||
Long: "https://linux.die.net/man/1/arecord", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
DisableFlagParsing: true, | ||
} | ||
|
||
func Execute() error { | ||
return cmd.ExecuteArecord() | ||
return rootCmd.Execute() | ||
} | ||
|
||
func init() { | ||
carapace.Gen(rootCmd).Standalone() | ||
|
||
carapace.Gen(rootCmd).PositionalAnyCompletion( | ||
bridge.ActionCarapaceBin("aplay"), | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,27 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace-bin/completers/google-chrome_completer/cmd" | ||
"github.com/rsteube/carapace" | ||
"github.com/rsteube/carapace-bridge/pkg/actions/bridge" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
/** | ||
Description for go:generate | ||
Use: "chromium", | ||
Short: "chromium browser", | ||
Long: "https://www.chromium.org/Home", | ||
*/ | ||
var rootCmd = &cobra.Command{ | ||
Use: "chromium", | ||
Short: "chromium browser", | ||
Long: "https://www.chromium.org/Home", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
DisableFlagParsing: true, | ||
} | ||
|
||
func Execute() error { | ||
return cmd.ExecuteAlias("chromium") | ||
return rootCmd.Execute() | ||
} | ||
|
||
func init() { | ||
carapace.Gen(rootCmd).Standalone() | ||
|
||
carapace.Gen(rootCmd).PositionalAnyCompletion( | ||
bridge.ActionCarapaceBin("google-chrome"), | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,27 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace-bin/completers/code_completer/cmd" | ||
"github.com/rsteube/carapace" | ||
"github.com/rsteube/carapace-bridge/pkg/actions/bridge" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
/** | ||
Description for go:generate | ||
Use: "code-insiders", | ||
Short: "Visual Studio Code Insiders", | ||
Long: "https://code.visualstudio.com/insiders/", | ||
*/ | ||
var rootCmd = &cobra.Command{ | ||
Use: "code-insiders", | ||
Short: "Visual Studio Code Insiders", | ||
Long: "https://code.visualstudio.com/insiders/", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
DisableFlagParsing: true, | ||
} | ||
|
||
func Execute() error { | ||
return cmd.ExecuteInsiders() | ||
return rootCmd.Execute() | ||
} | ||
|
||
func init() { | ||
carapace.Gen(rootCmd).Standalone() | ||
|
||
carapace.Gen(rootCmd).PositionalAnyCompletion( | ||
bridge.ActionCarapaceBin("code"), | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,27 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace-bin/completers/grep_completer/cmd" | ||
"github.com/rsteube/carapace" | ||
"github.com/rsteube/carapace-bridge/pkg/actions/bridge" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
/** | ||
Description for go:generate | ||
Use: "egrep", | ||
Short: "print lines that match patterns", | ||
Long: "https://linux.die.net/man/1/grep", | ||
*/ | ||
var rootCmd = &cobra.Command{ | ||
Use: "egrep", | ||
Short: "print lines that match patterns", | ||
Long: "https://linux.die.net/man/1/grep", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
DisableFlagParsing: true, | ||
} | ||
|
||
func Execute() error { | ||
return cmd.ExecuteOverride("egrep") | ||
return rootCmd.Execute() | ||
} | ||
|
||
func init() { | ||
carapace.Gen(rootCmd).Standalone() | ||
|
||
carapace.Gen(rootCmd).PositionalAnyCompletion( | ||
bridge.ActionCarapaceBin("grep"), | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,27 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace-bin/completers/grep_completer/cmd" | ||
"github.com/rsteube/carapace" | ||
"github.com/rsteube/carapace-bridge/pkg/actions/bridge" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
/** | ||
Description for go:generate | ||
Use: "fgrep", | ||
Short: "print lines that match patterns", | ||
Long: "https://en.wikipedia.org/wiki/Grep", | ||
*/ | ||
var rootCmd = &cobra.Command{ | ||
Use: "fgrep", | ||
Short: "print lines that match patterns", | ||
Long: "https://en.wikipedia.org/wiki/Grep", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
DisableFlagParsing: true, | ||
} | ||
|
||
func Execute() error { | ||
return cmd.ExecuteOverride("fgrep") | ||
return rootCmd.Execute() | ||
} | ||
|
||
func init() { | ||
carapace.Gen(rootCmd).Standalone() | ||
|
||
carapace.Gen(rootCmd).PositionalAnyCompletion( | ||
bridge.ActionCarapaceBin("grep"), | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,27 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace-bin/completers/http_completer/cmd" | ||
"github.com/rsteube/carapace" | ||
"github.com/rsteube/carapace-bridge/pkg/actions/bridge" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
/** | ||
Description for go:generate | ||
Use: "https", | ||
Short: "command-line HTTP client for the API era", | ||
Long: "https://httpie.io/", | ||
*/ | ||
var rootCmd = &cobra.Command{ | ||
Use: "https", | ||
Short: "command-line HTTP client for the API era", | ||
Long: "https://httpie.io/", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
DisableFlagParsing: true, | ||
} | ||
|
||
func Execute() error { | ||
return cmd.ExecuteHttps() | ||
return rootCmd.Execute() | ||
} | ||
|
||
func init() { | ||
carapace.Gen(rootCmd).Standalone() | ||
|
||
carapace.Gen(rootCmd).PositionalAnyCompletion( | ||
bridge.ActionCarapaceBin("http"), | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,27 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace-bin/completers/helix_completer/cmd" | ||
"github.com/rsteube/carapace" | ||
"github.com/rsteube/carapace-bridge/pkg/actions/bridge" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
/** | ||
Description for go:generate | ||
Use: "hx", | ||
Short: "A post-modern text editor", | ||
Long: "https://helix-editor.com/", | ||
*/ | ||
var rootCmd = &cobra.Command{ | ||
Use: "hx", | ||
Short: "A post-modern text editor", | ||
Long: "https://helix-editor.com/", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
DisableFlagParsing: true, | ||
} | ||
|
||
func Execute() error { | ||
return cmd.ExecuteHx() | ||
return rootCmd.Execute() | ||
} | ||
|
||
func init() { | ||
carapace.Gen(rootCmd).Standalone() | ||
|
||
carapace.Gen(rootCmd).PositionalAnyCompletion( | ||
bridge.ActionCarapaceBin("helix"), | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,27 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace-bin/completers/xz_completer/cmd" | ||
"github.com/rsteube/carapace" | ||
"github.com/rsteube/carapace-bridge/pkg/actions/bridge" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
/** | ||
Description for go:generate | ||
Use: "lzcat", | ||
Short: "Compress or decompress .xz and .lzma files", | ||
Long: "https://linux.die.net/man/1/xz", | ||
*/ | ||
var rootCmd = &cobra.Command{ | ||
Use: "lzcat", | ||
Short: "Compress or decompress .xz and .lzma files", | ||
Long: "https://linux.die.net/man/1/xz", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
DisableFlagParsing: true, | ||
} | ||
|
||
func Execute() error { | ||
return cmd.ExecuteAlias("lzcat") | ||
return rootCmd.Execute() | ||
} | ||
|
||
func init() { | ||
carapace.Gen(rootCmd).Standalone() | ||
|
||
carapace.Gen(rootCmd).PositionalAnyCompletion( | ||
bridge.ActionCarapaceBin("xz"), | ||
) | ||
} |
Oops, something went wrong.