summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2014-01-26 01:49:36 +0100
committerGravatar Tom Willemse2014-01-26 01:49:36 +0100
commit0419f1ba9252fd02b14a5f0243dd62c88fbb1717 (patch)
tree0936317cd44fcd0d52fa67b12adec442654ef969
parent46359b0e427367058ad2a7793eb20aeea2180622 (diff)
downloadeshell-fringe-status-0419f1ba9252fd02b14a5f0243dd62c88fbb1717.tar.gz
eshell-fringe-status-0419f1ba9252fd02b14a5f0243dd62c88fbb1717.zip
Make the leading space optional
The first time eshell starts it won't yet have printed such a space.
-rw-r--r--eshell-fringe-status.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/eshell-fringe-status.el b/eshell-fringe-status.el
index 56f58fb..5cde3a8 100644
--- a/eshell-fringe-status.el
+++ b/eshell-fringe-status.el
@@ -71,7 +71,7 @@ which doesn't accept at least one space will break."
(let ((first (aref eshell-prompt-regexp 0)))
(when (eql first ?^)
(setq eshell-prompt-regexp
- (format "%c %s" first (substring eshell-prompt-regexp 1))))))
+ (format "%c ?%s" first (substring eshell-prompt-regexp 1))))))
(defun efs--revert-prompt-regexp ()
"The counterpart for `efs--extend-prompt-regexp', remove a space.
@@ -83,7 +83,7 @@ disabling the mode."
(when (and (eql first ?^)
(eql (aref eshell-prompt-regexp 1) ?\s))
(setq eshell-prompt-regexp
- (format "%c%s" first (substring eshell-prompt-regexp 2))))))
+ (format "%c%s" first (substring eshell-prompt-regexp 3))))))
(defun eshell-fringe-status ()
"Display an indication of the last command's exit status.