aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/shell_liner.go
diff options
context:
space:
mode:
authorBl1tz23 <alex3angle@gmail.com>2021-08-10 13:45:24 +0300
committerBl1tz23 <alex3angle@gmail.com>2021-08-10 13:45:24 +0300
commit1c94b3d01340baad000188550fcf2ccab6ca80e5 (patch)
tree12c3da17eb2d1a43fef78021a3d7c79110b0ff5f /weed/shell/shell_liner.go
parente6e57db530217ff57b3622b4672b03ebb6313e96 (diff)
parentf9cf9b93d32a2b01bc4d95ce7d24d86ef60be668 (diff)
downloadseaweedfs-1c94b3d01340baad000188550fcf2ccab6ca80e5.tar.xz
seaweedfs-1c94b3d01340baad000188550fcf2ccab6ca80e5.zip
merge master, resolve conflicts
Diffstat (limited to 'weed/shell/shell_liner.go')
-rw-r--r--weed/shell/shell_liner.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/weed/shell/shell_liner.go b/weed/shell/shell_liner.go
index 1dd611ca5..765b0efda 100644
--- a/weed/shell/shell_liner.go
+++ b/weed/shell/shell_liner.go
@@ -31,6 +31,7 @@ func RunShell(options ShellOptions) {
})
line.SetCtrlCAborts(true)
+ line.SetTabCompletionStyle(liner.TabPrints)
setCompletionHandler()
loadHistory()
@@ -147,9 +148,11 @@ func loadHistory() {
func saveHistory() {
if f, err := os.Create(historyPath); err != nil {
- fmt.Printf("Error writing history file: %v\n", err)
+ fmt.Printf("Error creating history file: %v\n", err)
} else {
- line.WriteHistory(f)
+ if _, err = line.WriteHistory(f); err != nil {
+ fmt.Printf("Error writing history file: %v\n", err)
+ }
f.Close()
}
}