Skip to content

Commit

Permalink
Fixed bug in cmd, optimized usage
Browse files Browse the repository at this point in the history
  • Loading branch information
mrusme committed Apr 5, 2021
1 parent bcd2ce5 commit a6026cc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions mast/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func CmdAutocompleter(input string, knownUsers map[string]string) ([]string) {

for _, cmd := range CmdAvailable() {
if strings.HasPrefix(cmd, input) == true {
entries = append(entries, cmd + " ")
entries = append(entries, cmd)
}
}

Expand All @@ -124,7 +124,11 @@ func CmdAutocompleter(input string, knownUsers map[string]string) ([]string) {
func CmdProcessor(timeline *Timeline, input string) (CmdReturnCode) {
split := strings.SplitN(input, " ", 2)
cmd := split[0]
args := split[1]

args := ""
if len(split) == 2 {
args = split[1]
}

switch cmd {
case "home":
Expand Down

0 comments on commit a6026cc

Please sign in to comment.