diff --git a/main.go b/main.go index dafae4a..a44aa6b 100644 --- a/main.go +++ b/main.go @@ -41,7 +41,11 @@ func interactiveShell() { func showQueue() { var entries []parser.QEntry var err error - entries, err = readFromCmd(exec.Command(settings["mailqCommand"], settings["mailqCommandArgs"])) + if settings["mailqCommandArgs"] == "" { + entries, err = readFromCmd(exec.Command(settings["mailqCommand"])) + } else { + entries, err = readFromCmd(exec.Command(settings["mailqCommand"], settings["mailqCommandArgs"])) + } if err != nil { fmt.Printf("Error reading: %s\n", err.Error()) os.Exit(1)