mirror of
https://github.com/bettercap/bettercap
synced 2025-07-16 10:03:39 -07:00
new: history file location can now be set via BETTERCAP_HISTORY env var (closes #627)
This commit is contained in:
parent
9e7fda751a
commit
93de427f9a
2 changed files with 7 additions and 2 deletions
|
@ -72,7 +72,11 @@ func (s *Session) setupReadline() (err error) {
|
|||
|
||||
history := ""
|
||||
if !*s.Options.NoHistory {
|
||||
history, _ = fs.Expand(HistoryFile)
|
||||
histPath := DefaultHistoryFile
|
||||
if fromEnv := os.Getenv(HistoryEnvVar); fromEnv != "" {
|
||||
histPath = fromEnv
|
||||
}
|
||||
history, _ = fs.Expand(histPath)
|
||||
}
|
||||
|
||||
cfg := readline.Config{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue