3 ; grrr ... eshell-mode-map is buffer-local ...
4 (defun my-setup-eshell ()
5 (define-key eshell-mode-map (kbd "<up>") 'previous-line)
6 (define-key eshell-mode-map (kbd "<down>") 'next-line)
7 (define-key eshell-mode-map (kbd "C-<up>") 'eshell-previous-matching-input-from-input)
8 (define-key eshell-mode-map (kbd "C-<down>") 'eshell-next-matching-input-from-input)
9 (define-key eshell-mode-map (kbd "<home>") 'eshell-bol))
11 (add-hook 'eshell-mode-hook 'my-setup-eshell)
13 (defun eshell-switch-directory-current-buffer ()
15 (let ((dir default-directory)
16 (eshell-buffer (get-buffer "*eshell*")))
17 (if (not eshell-buffer)
18 (error "no *eshell* buffer found"))
19 (my-pop-to-buffer (get-buffer "*eshell*"))
20 (goto-char (point-max))
21 (setq default-directory dir)
22 (eshell-interrupt-process)))
24 (global-set-key "\C-cE" 'eshell-switch-directory-current-buffer)
26 (setenv "PATH" (concat (getenv "PATH")
28 (expand-file-name "~/bin")
30 (expand-file-name "~/.local/bin")))