eshell: fix hyperbole and remove unused sudo toggle
This commit is contained in:
parent
eb7f03b1c9
commit
640211d570
@ -40,11 +40,6 @@
|
||||
"b" (general-key "C-c C-e")
|
||||
"r" (general-key "C-c C-v r")
|
||||
"s" 'eshell)
|
||||
;; eshell fixes
|
||||
(general-define-key
|
||||
:states 'normal
|
||||
:maps 'eshell-mode-map
|
||||
"I" 'eshell-evil-insert-line)
|
||||
|
||||
(provide 'mitch-keybinds)
|
||||
;;; mitch-keybinds.el ends here
|
||||
|
@ -156,20 +156,15 @@ This is taken from a website that I can't remember at the moment."
|
||||
(if (null args) (bury-buffer)
|
||||
(mapc #'find-file-other-window
|
||||
(mapcar #'expand-file-name (flatten-tree (reverse args))))))
|
||||
(defun aweshell-sudo-toggle ()
|
||||
"Toggle sudo with current command."
|
||||
(interactive)
|
||||
(save-excursion
|
||||
(let ((commands (buffer-substring-no-properties
|
||||
(progn (eshell-bol) (point)) (point-max))))
|
||||
(if (string-match-p "^sudo " commands)
|
||||
(progn
|
||||
(eshell-bol)
|
||||
(while (re-search-forward "sudo " nil t)
|
||||
(replace-match "" t nil)))
|
||||
(progn
|
||||
(eshell-bol)
|
||||
(insert "sudo ")))))))
|
||||
(defun mitch/eshell-setup-keys ()
|
||||
(evil-collection-define-key
|
||||
'normal
|
||||
'eshell-mode-map
|
||||
(kbd "I") 'eshell-evil-insert-line
|
||||
(kbd "RET") 'hkey-either))
|
||||
(advice-add 'evil-collection-eshell-setup-keys
|
||||
:after 'mitch/eshell-setup-keys))
|
||||
|
||||
(use-package eat
|
||||
:straight (:repo "https://codeberg.org/akib/emacs-eat"
|
||||
:files ("*.el" "dir" "*.info" "*.texi" "*.ti" ("e" "e/*")))
|
||||
|
Loading…
Reference in New Issue
Block a user