diff options
Diffstat (limited to 'emacs.org')
-rwxr-xr-x | emacs.org | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -369,11 +369,23 @@ Hook with ~dired-mode~ :config (defvar eshell-path-env (getenv "~/.local/bin"))) + (defun eshell-load-bash-aliases () + "Read Bash aliases and add them to the list of eshell aliases." + ;; Bash needs to be run - temporarily - interactively + ;; in order to get the list of aliases. + (with-temp-buffer + (call-process "bash" nil '(t nil) nil "-ci" "alias") + (goto-char (point-min)) + (while (re-search-forward "alias \\(.+\\)='\\(.+\\)'$" nil t) + (eshell/alias (match-string 1) (match-string 2))))) + + (defalias 'open 'find-file) + (add-hook 'eshell-alias-load-hook 'eshell-load-bash-aliases) (eshell-git-prompt-use-theme 'powerline) (eshell-syntax-highlighting-global-mode 1) - (defalias 'open 'find-file) + ;; (setq eshell-prompt-function 'apollo-eshell-prompt) (setq eshell-highlight-prompt t) |