init (sesshist) session on recall when it doesn't exist, minor changes to readme

pull/58/head v2.4.8
Simon Let 6 years ago
parent f73e4f9c28
commit e02757383c
  1. 6
      README.md
  2. 5
      pkg/sesshist/sesshist.go

@ -67,7 +67,9 @@ Imagine being able to search your shell history based on both the command itself
- :heavy_check_mark: Be compatible with Linux and macOS
- :heavy_check_mark: Require very little prerequisite software
- :white_check_mark: Require very little prerequisite software
- :heavy_check_mark: Linux
- :x: MacOS
- :white_check_mark: Show cool graphs based on recorded history
@ -92,6 +94,8 @@ Standard stuff: `bash`, `curl`, `tar`, ...
Additional prerequisities: `bash-completion` (if you use bash)
MacOS: `coreutils`
## Installation
### Simplest

@ -151,8 +151,9 @@ func (s *Dispatch) Recall(sessionID string, histno int, prefix string) (string,
s.mutex.RUnlock()
if found == false {
// go s.initSession(sessionID)
return "", errors.New("sesshist ERROR: No session history for SessionID " + sessionID + " - should we create one?")
// TODO: propagate actual shell here so we can use it
go s.initSession(sessionID, "bash")
return "", errors.New("sesshist ERROR: No session history for SessionID " + sessionID + " - creating one ...")
}
log.Println("sesshist - recall: Locking session lock ...")
session.mutex.Lock()

Loading…
Cancel
Save