Documentation
¶
Overview ¶
Package cliedit cmd/skywire-cli/commands/edit/edit.go c4-vis-cli
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "edit [file]", Short: "Terminal text editor", Long: "Small terminal text editor (Ctrl+S save, Ctrl+Q quit). In the browser shell it edits in a real text area.", Hidden: true, Args: cobra.MaximumNArgs(1), Run: func(_ *cobra.Command, args []string) { filename := "untitled" var content string if len(args) == 1 { filename = args[0] data, err := os.ReadFile(filename) if err != nil && !os.IsNotExist(err) { cmdutil.Eprintf("edit: %v\n", err) cmdutil.Exit(1) } content = string(data) } if err := run(filename, content); err != nil { cmdutil.Eprintf("edit: %v\n", err) cmdutil.Exit(1) } }, }
RootCmd is the edit command
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.