mirror of
https://github.com/SqrtMinusOne/eshell-atuin.git
synced 2025-12-10 12:23:03 +03:00
Merge pull request #7 from jeffkreeftmeijer/eshell-bol-ignoring-prompt
Use eshell-bol-ignoring-prompt on Emacs 30
This commit is contained in:
commit
1b71d4c180
1 changed files with 6 additions and 1 deletions
|
|
@ -128,10 +128,15 @@ include here. Some examples:
|
|||
(defvar eshell-atuin--session-id nil
|
||||
"Current atuin session ID.")
|
||||
|
||||
(defun eshell-atuin--bol-ignoring-prompt ()
|
||||
(if (fboundp 'eshell-bol-ignoring-prompt)
|
||||
(eshell-bol-ignoring-prompt nil)
|
||||
(beginning-of-line)))
|
||||
|
||||
(defun eshell-atuin--get-input ()
|
||||
"Get eshell input string on the current line."
|
||||
(save-excursion
|
||||
(beginning-of-line)
|
||||
(eshell-atuin--bol-ignoring-prompt)
|
||||
(when (looking-at-p eshell-prompt-regexp)
|
||||
(substring-no-properties (eshell-get-old-input)))))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue