From 15f83cc78f9776e9c63a57f681c60608221a7758 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sat, 17 Aug 2013 20:43:05 +0200 Subject: [PATCH] * Fixed eshell pwd function * Minor changes --- init-custom.el | 2 +- init-eshell.el | 15 +++++---------- init-settings.el | 1 + 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/init-custom.el b/init-custom.el index 22e37bfa6..a67302aa5 100644 --- a/init-custom.el +++ b/init-custom.el @@ -12,7 +12,7 @@ '(haskell-mode-hook (quote (capitalized-words-mode turn-on-haskell-decl-scan turn-on-haskell-doc turn-on-hi2))) - '(it-mode-google-cmd "/usr/local/share/python/google") + '(it-mode-google-cmd "/usr/local/bin/google") '(ns-alternate-modifier (quote none)) '(ns-command-modifier (quote meta)) '(require-final-newline (quote visit-save))) diff --git a/init-eshell.el b/init-eshell.el index 58c588851..77f99e551 100644 --- a/init-eshell.el +++ b/init-eshell.el @@ -27,8 +27,10 @@ (defun clean-pwd (path) "Turns a path of the form /foo/bar/baz into /f/b/baz (inspired by fish shell)" - (message path) - (let* ((current-dir (split-string path "/")) + (let* ((hpath (replace-regexp-in-string home-dir + "~" + path)) + (current-dir (split-string hpath "/")) (cdir (last current-dir)) (head (butlast current-dir))) (concat (mapconcat (lambda (s) @@ -39,13 +41,6 @@ (if head "/" nil) (car cdir)))) -(setq eshell-pwd-convert-function - (lambda (path) - (clean-pwd (replace-regexp-in-string - home-dir - "~" - path)))) - (defun vcprompt (&optional args) "Call the external vcprompt command with optional arguments. VCPrompt" @@ -59,7 +54,7 @@ (defun prompt-f () "My EShell prompt displaying VC info and such" (concat - (with-face (concat (eshell/pwd) " ") :foreground "#96a6c8") + (with-face (concat (clean-pwd (eshell/pwd)) " ") :foreground "#96a6c8") (with-face (vcprompt " -f \"(%s:%b%a%m) \"") :foreground "#5f627f") (if (= 0 (user-uid)) (with-face "#" :foreground "#f43841") diff --git a/init-settings.el b/init-settings.el index 2f22f42a0..373049796 100644 --- a/init-settings.el +++ b/init-settings.el @@ -120,6 +120,7 @@ comment as a filename." ;; Not the real deal without this ... (set-variable 'nyan-wavy-trail t) +;; Style line numbers (shown with M-g g) (setq linum-format (lambda (line) (propertize (format (concat " %"