-
Notifications
You must be signed in to change notification settings - Fork 0
/
#starter-kit-eshell.org#
45 lines (38 loc) · 1.79 KB
/
#starter-kit-eshell.org#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#+TITLE: Starter Kit Eshell
#+OPTIONS: toc:nil num:nil ^:nil
This is part of the [[file:starter-kit.org][Emacs Starter Kit]].
* Starter Kit Eshell
[[http://www.emacswiki.org/emacs/CategoryEshell][Eshell]] is a great shell.
#+begin_src emacs-lisp
(setq eshell-cmpl-cycle-completions nil
eshell-save-history-on-exit t
eshell-cmpl-dir-ignore "\\`\\(\\.\\.?\\|CVS\\|\\.svn\\|\\.git\\)/\\'")
(eval-after-load 'esh-opt
'(progn
(require 'em-cmpl)
(require 'em-prompt)
(require 'em-term)
;; TODO: for some reason requiring this here breaks it, but
;; requiring it after an eshell session is started works fine.
;; (require 'eshell-vc)
(setenv "PAGER" "cat")
; (set-face-attribute 'eshell-prompt nil :foreground "turquoise1")
(add-hook 'eshell-mode-hook ;; for some reason this needs to be a hook
'(lambda () (define-key eshell-mode-map "\C-a" 'eshell-bol)))
(add-to-list 'eshell-visual-commands "ssh")
(add-to-list 'eshell-visual-commands "tail")
(add-to-list 'eshell-command-completions-alist
'("gunzip" "gz\\'"))
(add-to-list 'eshell-command-completions-alist
'("tar" "\\(\\.tar|\\.tgz\\|\\.tar\\.gz\\)\\'"))
(add-to-list 'eshell-output-filter-functions 'eshell-handle-ansi-color)))
#+end_src
The =eshell= directory holds alias definitions and history
information. It is much like a =.bashrc= file for those who are
familiar with bash. This set the value of =eshell-directory-name= to
point to the =eshell= directory in this directory. The =alias= file
is pre-populated with some generally applicable aliases.
#+begin_src emacs-lisp
(setq eshell-directory-name
(expand-file-name "./" (expand-file-name "eshell" starter-kit-dir)))
#+end_src