diff options
| author | Chris Lu <chris.lu@gmail.com> | 2021-09-08 15:55:19 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2021-09-08 15:55:19 -0700 |
| commit | 0b4269b6a86b882247f7a3ca5c7339fcb4397e43 (patch) | |
| tree | f24075cc83d5a267ae755221c99cb0fb1f5bdc8e | |
| parent | 0207f5fe9b9339575a266d1db566ad8589f86318 (diff) | |
| download | seaweedfs-0b4269b6a86b882247f7a3ca5c7339fcb4397e43.tar.xz seaweedfs-0b4269b6a86b882247f7a3ca5c7339fcb4397e43.zip | |
remember commands even if failed
| -rw-r--r-- | weed/shell/shell_liner.go | 4 |
1 files changed, 3 insertions, 1 deletions
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:])) |
