From 17dad7f6d0830c3b7b3d4c496521301a7e072636 Mon Sep 17 00:00:00 2001 From: Maas Lalani Date: Tue, 3 Oct 2023 14:22:32 -0400 Subject: [PATCH] Apply suggestions from code review --- command.go | 7 ++----- examples/clipboard.tape | 6 +++++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/command.go b/command.go index 9bc739f40..0b4adf135 100644 --- a/command.go +++ b/command.go @@ -265,16 +265,13 @@ func ExecuteOutput(c Command, v *VHS) { } func ExecuteCopy(c Command, _ *VHS) { - err := clipboard.WriteAll(c.Args) - if err != nil { - fmt.Println(err) - } + _ = clipboard.WriteAll(c.Args) } func ExecutePaste(_ Command, v *VHS) { clip, err := clipboard.ReadAll() if err != nil { - fmt.Println(err) + return } for _, r := range clip { k, ok := keymap[r] diff --git a/examples/clipboard.tape b/examples/clipboard.tape index e96f8f47c..fd2aefc2b 100644 --- a/examples/clipboard.tape +++ b/examples/clipboard.tape @@ -1,6 +1,10 @@ -Output examples/clipboard.gif +Output examples/commands/clipboard.gif + +Set FontSize 42 +Set Height 225 Copy "https://github.com/charmbracelet" Type "open " Sleep 500ms Paste +Sleep 3s