From 480f8696fb9339bec9281d83d628f5125d20d94d Mon Sep 17 00:00:00 2001 From: David Dworken Date: Sat, 7 Oct 2023 15:19:51 -0700 Subject: [PATCH] Also read imports from ~/.zhistory which is sometimes used by zsh --- client/lib/lib.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/lib/lib.go b/client/lib/lib.go index 1acd01b..d291397 100644 --- a/client/lib/lib.go +++ b/client/lib/lib.go @@ -271,6 +271,10 @@ func ImportHistory(ctx context.Context, shouldReadStdin, force bool) (int, error if histfile := os.Getenv("HISTFILE"); histfile != "" && histfile != zshHistPath && histfile != bashHistPath { entriesIter = concatIterators(entriesIter, readFileToIterator(histfile)) } + zHistPath := filepath.Join(homedir, ".zhistory") + if zHistPath != os.Getenv("HISTFILE") { + entriesIter = concatIterators(entriesIter, readFileToIterator(zHistPath)) + } if shouldReadStdin { extraEntries, err := readStdin() if err != nil {