diff options
author | Franck Cuny <fcuny@twitter.com> | 2019-08-29 16:57:58 -0700 |
---|---|---|
committer | Franck Cuny <fcuny@twitter.com> | 2019-08-29 16:57:58 -0700 |
commit | 3325f76f2844795b493fd4cfd819798b8dc98bef (patch) | |
tree | 604db2109b5084508d3fa9ffa765058da5fb12b0 /emacs | |
parent | [emacs] fix configuration for json (diff) | |
download | emacs.d-3325f76f2844795b493fd4cfd819798b8dc98bef.tar.gz |
[emacs] giving a try to eshell
Diffstat (limited to '')
-rw-r--r-- | emacs.d/custom/fcuny-eshell.el | 38 | ||||
-rw-r--r-- | emacs.d/init.el | 2 |
2 files changed, 40 insertions, 0 deletions
diff --git a/emacs.d/custom/fcuny-eshell.el b/emacs.d/custom/fcuny-eshell.el new file mode 100644 index 0000000..0bf6547 --- /dev/null +++ b/emacs.d/custom/fcuny-eshell.el @@ -0,0 +1,38 @@ +(use-package eshell + :hook (eshell-mode . fcuny/eshell-mode-setup) + + :custom + (eshell-scroll-to-bottom-on-input 'all) + (eshell-error-if-no-glob t) + (eshell-hist-ignoredups t) + (eshell-save-history-on-exit t) + (eshell-prefer-lisp-functions nil) + (eshell-destroy-buffer-when-process-dies t) + + :init + (defun fcuny/eshell-mode-setup () + (eshell/alias "e" "find-file $1") + (eshell/alias "emacs" "find-file $1") + (eshell/alias "ee" "find-file-other-window $1") + + (eshell/alias "gd" "magit-diff-unstaged") + (eshell/alias "gds" "magit-diff-staged") + (eshell/alias "d" "dired $1")) + + (defun eshell/gst (&rest args) + (magit-status (pop args) nil) + (eshell/echo)) ;; The echo command suppresses output + + (defun fcuny/eshell-here () + "Opens up a new shell in the directory associated with the current +buffer's file. The eshell is renamed to match that directory to make +multiple eshell windows easier." + (interactive) + (let* ((height (/ (window-total-height) 3))) + (split-window-vertically (- height)) + (other-window 1) + (eshell "new") + (insert (concat "ls")) + (eshell-send-input)))) + +(provide 'fcuny-eshell) diff --git a/emacs.d/init.el b/emacs.d/init.el index 933bf49..fb22550 100644 --- a/emacs.d/init.el +++ b/emacs.d/init.el @@ -47,4 +47,6 @@ (require 'fcuny-python) (require 'fcuny-shell) +(require 'fcuny-eshell) + (require 'fcuny-twitter) |