mirror of
https://github.com/ddworken/hishtory.git
synced 2024-11-22 16:24:00 +01:00
Also read imports from ~/.zhistory which is sometimes used by zsh
This commit is contained in:
parent
d2788a9f31
commit
480f8696fb
@ -271,6 +271,10 @@ func ImportHistory(ctx context.Context, shouldReadStdin, force bool) (int, error
|
|||||||
if histfile := os.Getenv("HISTFILE"); histfile != "" && histfile != zshHistPath && histfile != bashHistPath {
|
if histfile := os.Getenv("HISTFILE"); histfile != "" && histfile != zshHistPath && histfile != bashHistPath {
|
||||||
entriesIter = concatIterators(entriesIter, readFileToIterator(histfile))
|
entriesIter = concatIterators(entriesIter, readFileToIterator(histfile))
|
||||||
}
|
}
|
||||||
|
zHistPath := filepath.Join(homedir, ".zhistory")
|
||||||
|
if zHistPath != os.Getenv("HISTFILE") {
|
||||||
|
entriesIter = concatIterators(entriesIter, readFileToIterator(zHistPath))
|
||||||
|
}
|
||||||
if shouldReadStdin {
|
if shouldReadStdin {
|
||||||
extraEntries, err := readStdin()
|
extraEntries, err := readStdin()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user