aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-03-24 02:40:51 -0700
committerChris Lu <chris.lu@gmail.com>2020-03-24 02:40:51 -0700
commitd83e648c0b9789baafb985f802a2754860a169ef (patch)
tree6f3a3a9283c7e6a3fa6ab75cb06347a90dfe5410
parenta875f67a0809fe949757bb02fd25c33bdcdcc220 (diff)
downloadseaweedfs-d83e648c0b9789baafb985f802a2754860a169ef.tar.xz
seaweedfs-d83e648c0b9789baafb985f802a2754860a169ef.zip
auto add prefix "fs."
-rw-r--r--weed/shell/shell_liner.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/weed/shell/shell_liner.go b/weed/shell/shell_liner.go
index a4f17e0fa..0ad46254e 100644
--- a/weed/shell/shell_liner.go
+++ b/weed/shell/shell_liner.go
@@ -6,9 +6,8 @@ import (
"os"
"path"
"regexp"
- "strings"
-
"sort"
+ "strings"
"github.com/peterh/liner"
)
@@ -66,7 +65,7 @@ func RunShell(options ShellOptions) {
} else {
foundCommand := false
for _, c := range Commands {
- if c.Name() == cmd {
+ if c.Name() == cmd || c.Name() == "fs."+cmd {
if err := c.Do(args, commandEnv, os.Stdout); err != nil {
fmt.Fprintf(os.Stderr, "error: %v\n", err)
}