summaryrefslogtreecommitdiff
path: root/emacs.org
diff options
context:
space:
mode:
Diffstat (limited to 'emacs.org')
-rwxr-xr-xemacs.org59
1 files changed, 28 insertions, 31 deletions
diff --git a/emacs.org b/emacs.org
index 93b87fa..e7cb47a 100755
--- a/emacs.org
+++ b/emacs.org
@@ -362,35 +362,6 @@ Hook with ~dired-mode~
#+begin_src emacs-lisp
(add-hook 'dired-mode-hook 'all-the-icons-dired-mode)
#+end_src
-* Eshell
-#+begin_src emacs-lisp
- (use-package eshell
- :ensure nil
- :bind (("C-c e" . 'eshell))
- :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 'o 'find-file)
- (add-hook 'eshell-alias-load-hook 'eshell-load-bash-aliases)
-
- (eshell-git-prompt-use-theme 'powerline)
- (eshell-syntax-highlighting-global-mode 1)
-
-
-
- ;; (setq eshell-prompt-function 'apollo-eshell-prompt)
- (setq eshell-highlight-prompt t)
-#+end_src
* Org-mode
** org-make-toc
#+begin_src emacs-lisp
@@ -852,6 +823,7 @@ Create function to watch videos using ~mpv~
("MCheck if merged" . my-mu4e-action-check-if-merged)))))
#+end_src
* Eshell
+** Completions
#+begin_src emacs-lisp
;;;; sudo completion
(defun pcomplete/sudo ()
@@ -910,10 +882,35 @@ Create function to watch videos using ~mpv~
(defun pcomplete/hut ()
"Completion rules for `hut' command"
(pcomplete-here (append pcomplete-hut-commands)))
+#+end_src
+** Aliases & Paths
+#+begin_src emacs-lisp
+ (defvar eshell-path-env (getenv "~/.local/bin"))
- (add-to-list 'eshell-visual-commands "mocp")
+ (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 'o 'find-file)
+
+ (add-hook 'eshell-alias-load-hook 'eshell-load-bash-aliases)
+#+end_src
+** Prompt
+#+begin_src emacs-lisp
+ (eshell-git-prompt-use-theme 'powerline)
+ (eshell-syntax-highlighting-global-mode 1)
+
+ (setq eshell-highlight-prompt t)
+#+end_src
+** Keybindings
+#+begin_src emacs-lisp
+ (global-set-key (kbd "C-c e") 'eshell)
#+end_src
* Misc
** Random functions