Skip to content

Commit

Permalink
handle args with spaces and double quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
mangofeet committed May 21, 2024
1 parent 8aba993 commit 97033ad
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions frame/basic/back.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,13 @@ func getCLIText() string {

if arg[0] != '-' {
isFlag = false
if strings.Contains(arg, " ") {
if strings.Contains(arg, `"`) {
arg = "'" + arg + "'"
} else {
arg = `"` + arg + `"`
}
}
args = append(args, thisOpt+" "+arg)
} else {
thisOpt = arg
Expand Down

0 comments on commit 97033ad

Please sign in to comment.