Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 54 lines (45 sloc) 2.085 kb
5fcb34d @technomancy initial commit
authored
1 ;;; starter-kit-eshell.el --- Making the defaults a bit saner
2 ;;
3 ;; Part of the Emacs Starter Kit
4
5 (setq eshell-cmpl-cycle-completions nil
6 eshell-save-history-on-exit t
fa60db0 @technomancy Revert "Use rx for regex construction for great justice."
authored
7 eshell-cmpl-dir-ignore "\\`\\(\\.\\.?\\|CVS\\|\\.svn\\|\\.git\\)/\\'")
5fcb34d @technomancy initial commit
authored
8
9 (eval-after-load 'esh-opt
10 '(progn
11 (require 'em-prompt)
12 (require 'em-term)
13 (require 'em-cmpl)
14 (setenv "PAGER" "cat")
15 (set-face-attribute 'eshell-prompt nil :foreground "turquoise1")
4292b49 @technomancy Set TERM=dumb in eshell.
authored
16 (add-hook 'eshell-mode-hook ;; for some reason this needs to be a hook
17 '(lambda () (eshell/export "TERM" "dumb")))
8c6edde @technomancy Some eshell stuff is no longer necessary in 23.
authored
18 (when (< emacs-major-version 23)
19 (add-hook 'eshell-mode-hook ;; for some reason this needs to be a hook
20 '(lambda () (define-key eshell-mode-map "\C-a" 'eshell-bol)))
21 (add-to-list 'eshell-output-filter-functions 'eshell-handle-ansi-color))
22
23 ;; TODO: submit these via M-x report-emacs-bug
5fcb34d @technomancy initial commit
authored
24 (add-to-list 'eshell-visual-commands "ssh")
25 (add-to-list 'eshell-visual-commands "tail")
26 (add-to-list 'eshell-command-completions-alist
fa60db0 @technomancy Revert "Use rx for regex construction for great justice."
authored
27 '("gunzip" "gz\\'"))
5fcb34d @technomancy initial commit
authored
28 (add-to-list 'eshell-command-completions-alist
8c6edde @technomancy Some eshell stuff is no longer necessary in 23.
authored
29 '("tar" "\\(\\.tar|\\.tgz\\|\\.tar\\.gz\\)\\'"))))
5fcb34d @technomancy initial commit
authored
30
94c4ea9 @technomancy Add cds eshell command.
authored
31 (defun eshell/cds ()
32 "Change directory to the project's root."
33 (eshell/cd (locate-dominating-file default-directory "src")))
34
4ba4630 @technomancy Disable eshell/find for now; doesn't work reliably.
authored
35 ;; (defun eshell/find (dir &rest opts)
36 ;; (find-dired dir (mapconcat 'identity opts " ")))
418be9d @technomancy Add experimental eshell/find.
authored
37
70daaf6 @technomancy Sanity check for scp. Disabled for now.
authored
38 ;; (defun eshell/scp (&rest args)
39 ;; "scp: now without colon-omitting annoyance!"
40 ;; (when (null (remove-if-not (lambda (arg) (string-match ":" arg))
41 ;; args))
42 ;; (error "Surely you meant to add a colon in there somewhere?"))
43 ;; (shell-command (mapconcat 'identity (cons "scp" args) " ")))
44
94c4ea9 @technomancy Add cds eshell command.
authored
45 ;; Port features from
46 ;; http://blog.peepcode.com/tutorials/2009/shell-method-missing/shell_method_missing.rb
47 ;; * cloning git repos, github repos
48 ;; * downloading http urls
49 ;; * extracting archives
50 ;; * changing to directories
51
5fcb34d @technomancy initial commit
authored
52 (provide 'starter-kit-eshell)
94c4ea9 @technomancy Add cds eshell command.
authored
53 ;;; starter-kit-eshell.el ends here
Something went wrong with that request. Please try again.