Properly handle empty args with new shellquote lib

Fixes #1454
This commit is contained in:
Zachary Yedidia
2020-01-06 11:38:21 -05:00
parent f3e8413e77
commit 6a465500bc
4 changed files with 25 additions and 1 deletions

View File

@@ -349,6 +349,9 @@ func (h *BufPane) OpenCmd(args []string) {
InfoBar.Error("Error parsing args ", err)
return
}
if len(args) == 0 {
return
}
filename = strings.Join(args, " ")
open := func() {
@@ -966,6 +969,10 @@ func (h *BufPane) HandleCommand(input string) {
return
}
if len(args) == 0 {
return
}
inputCmd := args[0]
if _, ok := commands[inputCmd]; !ok {