mirror of
https://github.com/ddworken/hishtory.git
synced 2025-02-02 11:39:24 +01:00
Respect HISTFILE for bash history too
This commit is contained in:
parent
ed3c67daf9
commit
6ded150f4a
@ -622,7 +622,11 @@ func parseFishHistory(homedir string) ([]string, error) {
|
||||
}
|
||||
|
||||
func parseBashHistory(homedir string) ([]string, error) {
|
||||
return readFileToArray(filepath.Join(homedir, ".bash_history"))
|
||||
histfile := os.Getenv("HISTFILE")
|
||||
if histfile == "" {
|
||||
histfile = filepath.Join(homedir, ".bash_history")
|
||||
}
|
||||
return readFileToArray(histfile)
|
||||
}
|
||||
|
||||
func readFileToArray(path string) ([]string, error) {
|
||||
|
Loading…
Reference in New Issue
Block a user