diff --git a/input_parser/input_parser.go b/input_parser/input_parser.go index 19e71aa..41481fe 100644 --- a/input_parser/input_parser.go +++ b/input_parser/input_parser.go @@ -36,8 +36,11 @@ func parse(input string) Input { var flags []string var args []string for _, arg := range split[1:] { - if len(arg) == 1 && arg[0] == '-' { - continue + if len(arg) == 1 { + if arg[0] == '-' { + continue + } + _ = append(args, string(arg[0])) } else if arg[0:2] == "--" { var result = strings.TrimSpace(arg) flags = append(flags, string(result[2:])) @@ -99,7 +102,7 @@ func input_str(env *environment.Env) string { history_index++ input = env.History[history_index] } else { - history_index = len(env.History)-1 + history_index = len(env.History) - 1 input = "" if r, _, _ := reader.ReadRune(); r == 65 { // UPP if history_index > 0 {