Skip to content

Commit

Permalink
Merge pull request #4 from vinodsr/fix/commands-with-space
Browse files Browse the repository at this point in the history
Fix for adding commands with space
  • Loading branch information
vinodsr authored May 12, 2020
2 parents 06888c5 + 6415089 commit 6760575
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/cli/add/add.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package add

import (
"bufio"
"fmt"
"os"
"strings"

"github.com/gookit/color"
Expand Down Expand Up @@ -35,7 +37,9 @@ func Execute() {
fmt.Printf("Input the command you need to run for %s ", contextInput)
fmt.Println()
fmt.Print("> ")
fmt.Scan(&commandInput)
scanner := bufio.NewScanner(os.Stdin)
scanner.Scan()
commandInput = scanner.Text()

fmt.Println()
fmt.Println()
Expand Down

0 comments on commit 6760575

Please sign in to comment.