From 0b4269b6a86b882247f7a3ca5c7339fcb4397e43 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Wed, 8 Sep 2021 15:55:19 -0700 Subject: [PATCH] remember commands even if failed --- weed/shell/shell_liner.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/weed/shell/shell_liner.go b/weed/shell/shell_liner.go index 64c8094fe..db9e815ff 100644 --- a/weed/shell/shell_liner.go +++ b/weed/shell/shell_liner.go @@ -84,10 +84,12 @@ https://cloud.seaweedfs.com/ui/%s func processEachCmd(reg *regexp.Regexp, cmd string, commandEnv *CommandEnv) bool { cmds := reg.FindAllString(cmd, -1) + + line.AppendHistory(cmd) + if len(cmds) == 0 { return false } else { - line.AppendHistory(cmd) args := make([]string, len(cmds[1:]))