* Abbreviate the prompt, if possible.
* Turn the aliases into real functions. Seems slightly prettier.
(save-match-data
(replace-regexp-in-string "\\..*$" "" (system-name)))
" "
(save-match-data
(replace-regexp-in-string "\\..*$" "" (system-name)))
" "
+ (let* ((pwd (eshell/pwd)) (npwd (length pwd))
+ (home (expand-file-name "~")) (nhome (length home)))
+ (if (and (>= npwd nhome)
+ (or (= nhome npwd)
+ (= (elt pwd nhome) ?/)
+ (string= (substring pwd 0 nhome) home)))
+ (concat "~" (substring pwd (length home)))
+ pwd))
right)))
(setq eshell-prompt-function 'mdw-eshell-prompt)
(setq eshell-prompt-regexp "^\\[[^]>]+\\(\\]\\|>>?\\)")
right)))
(setq eshell-prompt-function 'mdw-eshell-prompt)
(setq eshell-prompt-regexp "^\\[[^]>]+\\(\\]\\|>>?\\)")
-(defalias 'eshell/e 'find-file)
-(defalias 'eshell/w3m 'w3m-goto-url)
+(defun eshell/e (file) (find-file file) nil)
+(defun eshell/ee (file) (find-file-other-window file) nil)
+(defun eshell/w3m (url) (w3m-goto-url url) nil)
(mdw-define-face eshell-prompt (t :weight bold))
(mdw-define-face eshell-ls-archive (t :weight bold :foreground "red"))
(mdw-define-face eshell-prompt (t :weight bold))
(mdw-define-face eshell-ls-archive (t :weight bold :foreground "red"))