From cfbe6c2f871d6e58edc0205eb17b1d569fb00c48 Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Wed, 30 Dec 2020 14:23:01 -0500 Subject: [PATCH] Track eshell aliases in git --- emacs/.emacs.d/eshell/alias | 8 ++++++++ emacs/.emacs.d/init.org | 26 -------------------------- 2 files changed, 8 insertions(+), 26 deletions(-) create mode 100644 emacs/.emacs.d/eshell/alias diff --git a/emacs/.emacs.d/eshell/alias b/emacs/.emacs.d/eshell/alias new file mode 100644 index 0000000..27f162c --- /dev/null +++ b/emacs/.emacs.d/eshell/alias @@ -0,0 +1,8 @@ +alias root cd (projectile-project-root) +alias php-debug php -d xdebug.remote_enable=on -d xdebug.remote_host=127.0.0.1 -d xdebug.remote_port=9000 -d xdebug.remote_handler=dbgp -d xdebug.idekey=geben -d xdebug.remote_autostart=On $* +alias tf terraform $* +alias helm /usr/local/bin/helm $* +alias sortpom mvn com.github.ekryd.sortpom:sortpom-maven-plugin:sort -Dsort.keepBlankLines -Dsort.sortDependencies=scope,groupId,artifactId -Dsort.createBackupFile=false $* +alias kctx kubectx $* +alias k kubectl $* +alias kns kubens $* \ No newline at end of file diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 2d5925e..7b837d5 100755 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -2627,24 +2627,6 @@ A function to properly clear the eshell: (lambda () (general-def eshell-mode-map "C-c C-o" #'clear-eshell))) #+END_SRC -Some aliases: -#+BEGIN_SRC emacs-lisp - (defvar eshell-aliases nil - "Aliases loaded when Eshell starts") - - (setq eshell-aliases - '(("root" . "cd (projectile-project-root)"))) - - (add-hook - 'eshell-mode-hook - (lambda () - (dolist (alias eshell-aliases) - (eshell/alias (car alias) (cdr alias))))) - - (defun def-eshell-alias! (alias command) - (add-to-list 'eshell-aliases (cons alias command))) -#+END_SRC - ** Prompt #+BEGIN_SRC emacs-lisp (defun jdormit-eshell-prompt () @@ -3461,14 +3443,6 @@ Some keybindings to start and end Geben: (general-def php-mode-map "C-c C-q" #'geben-end) #+END_SRC -An Eshell alias to start PHP using XDebug: -#+BEGIN_SRC emacs-lisp - (add-hook 'eshell-mode-hook - (lambda () - (eshell/alias "php-debug" - "php -d xdebug.remote_enable=on -d xdebug.remote_host=127.0.0.1 -d xdebug.remote_port=9000 -d xdebug.remote_handler=dbgp -d xdebug.idekey=geben -d xdebug.remote_autostart=On $*"))) -#+END_SRC - LSP for PHP requires [[https://github.com/felixfbecker/php-language-server][php-language-server]] to be installed in ~/.composer: #+BEGIN_SRC emacs-lisp (add-hook 'php-mode-hook #'lsp-deferred)