Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
maaslalani authored Oct 3, 2023
1 parent 2a100ba commit 17dad7f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 2 additions & 5 deletions command.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,16 +265,13 @@ func ExecuteOutput(c Command, v *VHS) {
}

func ExecuteCopy(c Command, _ *VHS) {

Check warning on line 267 in command.go

View workflow job for this annotation

GitHub Actions / lint

exported: exported function ExecuteCopy should have comment or be unexported (revive)
err := clipboard.WriteAll(c.Args)
if err != nil {
fmt.Println(err)
}
_ = clipboard.WriteAll(c.Args)
}

func ExecutePaste(_ Command, v *VHS) {

Check warning on line 271 in command.go

View workflow job for this annotation

GitHub Actions / lint

exported: exported function ExecutePaste should have comment or be unexported (revive)
clip, err := clipboard.ReadAll()
if err != nil {
fmt.Println(err)
return
}
for _, r := range clip {
k, ok := keymap[r]
Expand Down
6 changes: 5 additions & 1 deletion examples/clipboard.tape
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 17dad7f

Please sign in to comment.