From e02757383c44f61b6e6d7805af45d1d172c0c43a Mon Sep 17 00:00:00 2001 From: Simon Let Date: Wed, 18 Dec 2019 18:13:28 +0100 Subject: [PATCH] init (sesshist) session on recall when it doesn't exist, minor changes to readme --- README.md | 6 +++++- pkg/sesshist/sesshist.go | 5 +++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 23e58ca..5caea57 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/pkg/sesshist/sesshist.go b/pkg/sesshist/sesshist.go index ac8bd92..f722764 100644 --- a/pkg/sesshist/sesshist.go +++ b/pkg/sesshist/sesshist.go @@ -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()