-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
1,047 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var cliCmd = &cobra.Command{ | ||
Use: "cli [OPTIONS] <COMMAND>", | ||
Short: "Interact with experimental mux server", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(cliCmd).Standalone() | ||
|
||
cliCmd.Flags().String("class", "", "Class of the gui instance") | ||
cliCmd.Flags().BoolP("help", "h", false, "Print help") | ||
cliCmd.Flags().Bool("no-auto-start", false, "Don't automatically start the server") | ||
cliCmd.Flags().Bool("prefer-mux", false, "Prefer connecting to a background mux server") | ||
rootCmd.AddCommand(cliCmd) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/rsteube/carapace-bin/pkg/actions/tools/wezterm" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var cli_activatePaneCmd = &cobra.Command{ | ||
Use: "activate-pane [OPTIONS]", | ||
Short: "Activate (focus) a pane", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(cli_activatePaneCmd).Standalone() | ||
|
||
cli_activatePaneCmd.Flags().BoolP("help", "h", false, "Print help") | ||
cli_activatePaneCmd.Flags().String("pane-id", "", "Specify the target pane") | ||
cliCmd.AddCommand(cli_activatePaneCmd) | ||
|
||
carapace.Gen(cli_activatePaneCmd).FlagCompletion(carapace.ActionMap{ | ||
"pane-id": wezterm.ActionPanes(), | ||
}) | ||
} |
29 changes: 29 additions & 0 deletions
29
completers/wezterm_completer/cmd/cli_activatePaneDirection.go
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/rsteube/carapace-bin/pkg/actions/tools/wezterm" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var cli_activatePaneDirectionCmd = &cobra.Command{ | ||
Use: "activate-pane-direction [OPTIONS] <DIRECTION>", | ||
Short: "Activate an adjacent pane in the specified direction", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(cli_activatePaneDirectionCmd).Standalone() | ||
|
||
cli_activatePaneDirectionCmd.Flags().BoolP("help", "h", false, "Print help") | ||
cli_activatePaneDirectionCmd.Flags().String("pane-id", "", "Specify the current pane") | ||
cliCmd.AddCommand(cli_activatePaneDirectionCmd) | ||
|
||
carapace.Gen(cli_activatePaneDirectionCmd).FlagCompletion(carapace.ActionMap{ | ||
"pane-id": wezterm.ActionPanes(), | ||
}) | ||
|
||
carapace.Gen(cli_activatePaneDirectionCmd).PositionalCompletion( | ||
wezterm.ActionPaneDirections(), | ||
) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/rsteube/carapace-bin/pkg/actions/tools/wezterm" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var cli_activateTabCmd = &cobra.Command{ | ||
Use: "activate-tab [OPTIONS]", | ||
Short: "Activate a tab", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(cli_activateTabCmd).Standalone() | ||
|
||
cli_activateTabCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')") | ||
cli_activateTabCmd.Flags().Bool("no-wrap", false, "Prevents wrapping around") | ||
cli_activateTabCmd.Flags().String("pane-id", "", "Specify the current pane") | ||
cli_activateTabCmd.Flags().String("tab-id", "", "Specify the target tab by its id") | ||
cli_activateTabCmd.Flags().String("tab-index", "", "Specify the target tab by its index") | ||
cli_activateTabCmd.Flags().String("tab-relative", "", "Specify the target tab by its relative offset") | ||
cliCmd.AddCommand(cli_activateTabCmd) | ||
|
||
carapace.Gen(cli_activateTabCmd).FlagCompletion(carapace.ActionMap{ | ||
"pane-id": wezterm.ActionPanes(), | ||
"tab-id": wezterm.ActionTabs(), | ||
// TODO more flags | ||
}) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/rsteube/carapace-bin/pkg/actions/tools/wezterm" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var cli_adjustPaneSizeCmd = &cobra.Command{ | ||
Use: "adjust-pane-size [OPTIONS] <DIRECTION>", | ||
Short: "Adjust the size of a pane directionally", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(cli_adjustPaneSizeCmd).Standalone() | ||
|
||
cli_adjustPaneSizeCmd.Flags().String("amount", "", "Specify the number of cells to resize by, defaults to 1") | ||
cli_adjustPaneSizeCmd.Flags().BoolP("help", "h", false, "Print help") | ||
cli_adjustPaneSizeCmd.Flags().String("pane-id", "", "Specify the target pane") | ||
cliCmd.AddCommand(cli_adjustPaneSizeCmd) | ||
|
||
carapace.Gen(cli_adjustPaneSizeCmd).FlagCompletion(carapace.ActionMap{ | ||
"pane-id": wezterm.ActionPanes(), | ||
}) | ||
|
||
carapace.Gen(cli_adjustPaneSizeCmd).PositionalCompletion( | ||
wezterm.ActionPaneDirections(), | ||
) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/rsteube/carapace-bin/pkg/actions/tools/wezterm" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var cli_getPaneDirectionCmd = &cobra.Command{ | ||
Use: "get-pane-direction [OPTIONS] <DIRECTION>", | ||
Short: "Determine the adjacent pane in the specified direction", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(cli_getPaneDirectionCmd).Standalone() | ||
|
||
cli_getPaneDirectionCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')") | ||
cli_getPaneDirectionCmd.Flags().String("pane-id", "", "Specify the current pane") | ||
cliCmd.AddCommand(cli_getPaneDirectionCmd) | ||
|
||
carapace.Gen(cli_getPaneDirectionCmd).FlagCompletion(carapace.ActionMap{ | ||
"pane-id": wezterm.ActionPanes(), | ||
}) | ||
|
||
carapace.Gen(cli_getPaneDirectionCmd).PositionalCompletion( | ||
wezterm.ActionPaneDirections(), | ||
) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/rsteube/carapace-bin/pkg/actions/tools/wezterm" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var cli_getTextCmd = &cobra.Command{ | ||
Use: "get-text [OPTIONS]", | ||
Short: "Retrieves the textual content of a pane and output it to stdout", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(cli_getTextCmd).Standalone() | ||
|
||
cli_getTextCmd.Flags().String("end-line", "", "The ending line number") | ||
cli_getTextCmd.Flags().Bool("escapes", false, "Include escape sequences that color and style the text") | ||
cli_getTextCmd.Flags().BoolP("help", "h", false, "Print help") | ||
cli_getTextCmd.Flags().String("pane-id", "", "Specify the target pane") | ||
cli_getTextCmd.Flags().String("start-line", "", "The starting line number") | ||
cliCmd.AddCommand(cli_getTextCmd) | ||
|
||
carapace.Gen(cli_getTextCmd).FlagCompletion(carapace.ActionMap{ | ||
"pane-id": wezterm.ActionPanes(), | ||
}) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var cli_helpCmd = &cobra.Command{ | ||
Use: "help [COMMAND]...", | ||
Short: "Print this message or the help of the given subcommand(s)", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(cli_helpCmd).Standalone() | ||
|
||
cliCmd.AddCommand(cli_helpCmd) | ||
|
||
carapace.Gen(cli_helpCmd).PositionalAnyCompletion( | ||
carapace.ActionCommands(cli_helpCmd), | ||
) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/rsteube/carapace-bin/pkg/actions/tools/wezterm" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var cli_killPaneCmd = &cobra.Command{ | ||
Use: "kill-pane [OPTIONS]", | ||
Short: "Kill a pane", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(cli_killPaneCmd).Standalone() | ||
|
||
cli_killPaneCmd.Flags().BoolP("help", "h", false, "Print help") | ||
cli_killPaneCmd.Flags().String("pane-id", "", "Specify the target pane") | ||
cliCmd.AddCommand(cli_killPaneCmd) | ||
|
||
carapace.Gen(cli_killPaneCmd).FlagCompletion(carapace.ActionMap{ | ||
"pane-id": wezterm.ActionPanes(), | ||
}) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var cli_listCmd = &cobra.Command{ | ||
Use: "list [OPTIONS]", | ||
Short: "list windows, tabs and panes", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(cli_listCmd).Standalone() | ||
|
||
cli_listCmd.Flags().String("format", "", "Controls the output format") | ||
cli_listCmd.Flags().BoolP("help", "h", false, "Print help") | ||
cliCmd.AddCommand(cli_listCmd) | ||
|
||
carapace.Gen(cli_listCmd).FlagCompletion(carapace.ActionMap{ | ||
"format": carapace.ActionValues("table", "json"), | ||
}) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var cli_listClientsCmd = &cobra.Command{ | ||
Use: "list-clients [OPTIONS]", | ||
Short: "list clients", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(cli_listClientsCmd).Standalone() | ||
|
||
cli_listClientsCmd.Flags().String("format", "", "Controls the output format") | ||
cli_listClientsCmd.Flags().BoolP("help", "h", false, "Print help") | ||
cliCmd.AddCommand(cli_listClientsCmd) | ||
|
||
carapace.Gen(cli_listClientsCmd).FlagCompletion(carapace.ActionMap{ | ||
"format": carapace.ActionValues("table", "json"), | ||
}) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/rsteube/carapace-bin/pkg/actions/tools/wezterm" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var cli_movePaneToNewTabCmd = &cobra.Command{ | ||
Use: "move-pane-to-new-tab [OPTIONS]", | ||
Short: "Move a pane into a new tab", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(cli_movePaneToNewTabCmd).Standalone() | ||
|
||
cli_movePaneToNewTabCmd.Flags().BoolP("help", "h", false, "Print help") | ||
cli_movePaneToNewTabCmd.Flags().Bool("new-window", false, "Create tab in a new window") | ||
cli_movePaneToNewTabCmd.Flags().String("pane-id", "", "Specify the pane that should be moved") | ||
cli_movePaneToNewTabCmd.Flags().String("window-id", "", "Specify the window into which the new tab will be created") | ||
cli_movePaneToNewTabCmd.Flags().String("workspace", "", "Override the default workspace name with the provided name") | ||
cliCmd.AddCommand(cli_movePaneToNewTabCmd) | ||
|
||
carapace.Gen(cli_movePaneToNewTabCmd).FlagCompletion(carapace.ActionMap{ | ||
"pane-id": wezterm.ActionPanes(), | ||
"window-id": wezterm.ActionWindows(), | ||
}) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var cli_proxyCmd = &cobra.Command{ | ||
Use: "proxy", | ||
Short: "start rpc proxy pipe", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(cli_proxyCmd).Standalone() | ||
|
||
cli_proxyCmd.Flags().BoolP("help", "h", false, "Print help") | ||
cliCmd.AddCommand(cli_proxyCmd) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/rsteube/carapace-bin/pkg/actions/tools/wezterm" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var cli_renameWorkspaceCmd = &cobra.Command{ | ||
Use: "rename-workspace [OPTIONS] <NEW_WORKSPACE>", | ||
Short: "Rename a workspace", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(cli_renameWorkspaceCmd).Standalone() | ||
|
||
cli_renameWorkspaceCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')") | ||
cli_renameWorkspaceCmd.Flags().String("pane-id", "", "Specify the current pane") | ||
cli_renameWorkspaceCmd.Flags().String("workspace", "", "Specify the workspace to rename") | ||
cliCmd.AddCommand(cli_renameWorkspaceCmd) | ||
|
||
carapace.Gen(cli_renameWorkspaceCmd).FlagCompletion(carapace.ActionMap{ | ||
"pane-id": wezterm.ActionPanes(), | ||
// TODO workspace | ||
}) | ||
} |
Oops, something went wrong.