Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;;; Package --- Summary
- ;;; Commentary:
- ;;; Settings for shell
- ;;; Code:
- (use-package eshell-z
- :ensure t)
- (use-package multi-term
- :ensure t
- :bind(:map global-map
- ("<f9>" . 'multi-term)
- ("C-<f9>" . 'multi-term-prev)
- ("M-<f9>" . 'multi-term-next))
- :config (setq-default multi-term-program "/bin/bash")
- (setq-default eshell-last-dir-ring-size 500))
- (defun eshell-scroll-to-bottom (window display-start)
- (if (and window (window-live-p window))
- (let ((resize-mini-windows nil))
- (save-selected-window
- (select-window window)
- (save-restriction
- (widen)
- (when (> (point) eshell-last-output-start) ; we're editing a line. Scroll.
- (save-excursion
- (recenter -1)
- (sit-for 0))))))))
- (defun eshell-add-scroll-to-bottom ()
- (interactive)
- (make-local-hook 'window-scroll-functions)
- (add-hook 'window-scroll-functions 'eshell-scroll-to-bottom nil t))
- (add-hook 'eshell-mode-hook 'eshell-add-scroll-to-bottom)
- (when (and (executable-find "fish")
- (require 'fish-completion nil t))
- (global-fish-completion-mode))
- (add-hook 'eshell-mode-hook (lambda()
- (interactive)
- (eshell-did-you-mean-setup)))
- (eval-after-load 'eshell
- '(require 'eshell-z nil t))
- (add-hook 'eshell-mode-hook 'eshell-fringe-status-mode)
- ;;; shell.el ends here
Advertisement
Add Comment
Please, Sign In to add comment