Also read imports from ~/.zhistory which is sometimes used by zsh

This commit is contained in:
David Dworken 2023-10-07 15:19:51 -07:00
parent d2788a9f31
commit 480f8696fb
No known key found for this signature in database

View File

@ -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 {