public
Description: Phil Hagelberg's personal dotfiles collection: the product of years of accumulated obsessive minor tweaks. Mostly Emacs Lisp.
Homepage: http://technomancy.us
Clone URL: git://github.com/technomancy/dotfiles.git
Eshell branch prompt fix with better faces.
technomancy (author)
Tue Sep 09 09:45:51 -0700 2008
commit  1a7fbc693e8350135af5cdfeaec8e4fb3a61f01a
tree    c1073fd928074afde47f5f91bbe07739668fad61
parent  318a8916ba7c7a5236d88a70ee609769c4c06a9c
...
98
99
100
 
 
 
101
102
103
...
98
99
100
101
102
103
104
105
106
0
@@ -98,6 +98,9 @@
0
 (eval-after-load 'texinfo-mode
0
   '(define-key texinfo-mode-map (kbd "C-x i") 'texinfo-view-info))
0
 
0
+(eval-after-load 'java-mode
0
+ '(define-key java-mode-map "\C-\M-h" 'backward-kill-word))
0
+
0
 (define-key isearch-mode-map (kbd "C-o") ;; occur easily inside isearch
0
   (lambda ()
0
     (interactive)
...
17
18
19
20
21
22
 
 
 
 
 
 
 
 
 
23
24
25
...
46
47
48
49
50
51
 
 
 
 
52
53
54
...
57
58
59
60
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
62
63
...
17
18
19
 
 
 
20
21
22
23
24
25
26
27
28
29
30
31
...
52
53
54
 
 
 
55
56
57
58
59
60
61
...
64
65
66
 
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
0
@@ -17,9 +17,15 @@
0
      (require 'esh-mode)
0
      (load "em-term.el")
0
 
0
- (setq eshell-cmpl-cycle-completions nil)
0
- (setq eshell-save-history-on-exit t)
0
- (set-face-attribute 'eshell-prompt nil :foreground "DeepSkyBlue")
0
+ (setq eshell-cmpl-cycle-completions nil
0
+ eshell-save-history-on-exit t
0
+ eshell-highlight-prompt nil)
0
+
0
+ (set-face-attribute 'eshell-prompt nil :foreground "turquoise1")
0
+
0
+ (defface eshell-branch-face
0
+ `((t (:foreground "DeepSkyBlue3")))
0
+ "Face for VC branch display.")
0
 
0
      (add-to-list 'eshell-visual-commands "ssh")
0
      ;; (add-to-list 'eshell-visual-commands "autotest")
0
@@ -46,9 +52,10 @@
0
 
0
      (setq eshell-prompt-function
0
            (lambda ()
0
- (concat (or (eshell/branch) "") " "
0
- (eshell/pwd)
0
- (if (= (user-uid) 0) " # " " $ "))))
0
+ (concat (propertize (or (eshell/branch) "") 'face 'eshell-branch-face) " "
0
+ (propertize (concat (eshell/pwd)
0
+ (if (= (user-uid) 0) " # " " $"))
0
+ 'face 'eshell-prompt) " ")))
0
 
0
      (defun eshell/branch ()
0
        "Return the current git branch, if applicable."
0
@@ -57,7 +64,22 @@
0
        (let ((branch (shell-command-to-string "git branch")))
0
          (string-match "^\\* \\(.*\\)" branch)
0
          (match-string 1 branch)))
0
-
0
+;;; (propertize (match-string 1 branch)
0
+;;; 'face 'eshell-branch-face)))
0
+
0
+ ;; Slow as the dickens on large non-VC'd directories. =\
0
+ (defun eshell/vc (&optional files)
0
+ "Return the VC backend and branch of the first VC-controlled file in the current dir."
0
+ ;; first two are . and .., which we drop with cdr
0
+ (let ((file (find t (cdr (cdr (directory-files (eshell/pwd))))
0
+ :test (lambda (true f) (vc-registered (expand-file-name f))))))
0
+ (when file
0
+ (vc-mode-line (expand-file-name file))
0
+ (propertize (substring-no-properties vc-mode 1)
0
+ :foreground "yellow green"))))
0
+
0
+
0
+ (vc-mode-line buffer-file-name)
0
      (defun eshell-make-primary ()
0
        "Make the current buffer swap names with \"*eshell*\"."
0
        (interactive)
...
8
9
10
11
12
13
 
14
...
8
9
10
 
 
11
12
13
0
@@ -8,5 +8,4 @@ if [ -r ~/.java_profile ]; then
0
     source ~/.java_profile
0
 fi
0
 
0
-# This doesn't seem to do anything
0
-export CDPATH=~/src:~/work
0
\ No newline at end of file
0
+export CDPATH=.:~/src:~/work
0
\ No newline at end of file
...
1
2
3
4
5
6
7
8
9
10
11
12
...
1
2
 
3
4
5
 
6
 
7
8
9
0
@@ -1,11 +1,8 @@
0
 #!/bin/bash
0
 
0
-xmodmap ~/.xmodmap
0
 devilspie &
0
 unclutter -idle 0.5 &
0
 xbindkeys &
0
-~/src/mpd-stats/mpd-stats.pl &
0
 conkeror -daemon &
0
-synergys &
0
 
0
 exec gnome-session
0
\ No newline at end of file

Comments

    No one has commented yet.