If this file is called eshell.org
, it weaves into eshell.el
, and
then require
gets problematic.
(add-hook 'emacs-startup-hook 'eshell)
jamf adds a symlink to the path, which makes completion barf when starting eshell.
¯\_(ツ)_/¯
So we will jiggery poke the path.
(setenv "PATH"
(replace-regexp-in-string ":/usr/local/bin/jamf"
""
(getenv "PATH")))
(defun emagician/eshell-command (cmd)
(with-current-buffer "*eshell*"
(eshell-return-to-prompt)
(insert cmd)
(eshell-send-input)))
(use-package eshell
:demand
:bind (:map eshell-mode-map
("M-S-r" . helm-eshell-history)))
This is apparently still an issue.
(defadvice eshell-gather-process-output (before absolute-cmd (command args) act)
(setq command (file-truename command)))
(add-to-list 'tramp-remote-path 'tramp-own-remote-path)
Use cat as a pager. Fixes all kinds of things.
(setenv "PAGER" "cat")
(use-package eshell-prompt-extras
:init
(setq eshell-highlight-prompt nil
eshell-prompt-function 'emagician/epe-theme))
(defun emagician/epe-theme ()
"Emagician Eshell Prompt Extras theme."
(setq eshell-prompt-regexp "^[^#\n🐰]*[#🐰]) ")
(concat
"\n"
(epe-colorize-with-face "\n" 'mode-line)
(when (epe-remote-p)
(epe-colorize-with-face "[ Remote ]"
'epe-remote-face))
(epe-colorize-with-face (eshell/pwd) 'epe-dir-face)
(when (epe-git-p)
(concat
(epe-colorize-with-face ":" 'epe-dir-face)
(epe-colorize-with-face
(concat (epe-git-branch)
(epe-git-dirty)
(epe-git-untracked)
(let ((unpushed (epe-git-unpushed-number)))
(unless (= unpushed 0)
(concat ":" (number-to-string unpushed)))))
'epe-git-face)))
(epe-colorize-with-face "\n 🐰)" 'epe-symbol-face)
(epe-colorize-with-face (if (= (user-uid) 0) "#" "") 'epe-sudo-symbol-face)
" "))
(use-package eshell-did-you-mean
:demand
:config
(eshell-did-you-mean-setup))
(use-package eshell-fringe-status
:init
(add-hook 'eshell-mode-hook 'eshell-fringe-status-mode))
[fn:1] Thank you wasamasa