Use a separate variable for shell history than command history.

Fixes #24
This commit is contained in:
Florian Margaine 2019-02-19 00:56:10 +01:00
parent b104921bcc
commit 5ffb95dc16
2 changed files with 9 additions and 3 deletions

View file

@ -482,9 +482,12 @@ then describes the symbol."
(define-stumpwm-type :shell (input prompt)
(declare (ignore prompt))
(let ((prompt (format nil "~A -c " *shell-program*)))
(or (argument-pop-rest input)
(completing-read (current-screen) prompt 'complete-program))))
(let ((prompt (format nil "~A -c " *shell-program*))
(*input-history* *input-shell-history*))
(unwind-protect
(or (argument-pop-rest input)
(completing-read (current-screen) prompt 'complete-program))
(setf *input-shell-history* *input-history*))))
(define-stumpwm-type :rest (input prompt)
(or (argument-pop-rest input)

View file

@ -157,6 +157,9 @@ and complete the input by mutating it."))
(defvar *input-history* nil
"History for the input line.")
(defvar *input-shell-history* nil
"History for shell lines.")
(defvar *input-last-command* nil
"The last input command.")