-
-
Notifications
You must be signed in to change notification settings - Fork 43
/
cli_getText.go
28 lines (23 loc) · 941 Bytes
/
cli_getText.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/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(),
})
}