Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Oct 15, 2023
1 parent 9642119 commit 35664dc
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
28 changes: 28 additions & 0 deletions completers/wezterm_completer/cmd/cli_getText.go
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",
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(),
})
}
26 changes: 26 additions & 0 deletions completers/wezterm_completer/cmd/cli_sendText.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package cmd

import (
"github.com/rsteube/carapace"
"github.com/rsteube/carapace-bin/pkg/actions/tools/wezterm"
"github.com/spf13/cobra"
)

var cli_sendTextCmd = &cobra.Command{
Use: "send-text",
Short: "Send text to a pane as though it were pasted",
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
carapace.Gen(cli_sendTextCmd).Standalone()

cli_sendTextCmd.Flags().BoolP("help", "h", false, "Print help")
cli_sendTextCmd.Flags().Bool("no-paste", false, "Send the text directly, rather than as a bracketed paste")
cli_sendTextCmd.Flags().String("pane-id", "", "Specify the target pane")
cliCmd.AddCommand(cli_sendTextCmd)

carapace.Gen(cli_sendTextCmd).FlagCompletion(carapace.ActionMap{
"pane-id": wezterm.ActionPanes(),
})
}

0 comments on commit 35664dc

Please sign in to comment.