;;; init-shell.el --- -*- lexical-binding: t -*- ;; ;; Filename: init-shell.el ;; Description: Initialize Shell ;; Author: Mingde (Matthew) Zeng ;; Copyright (C) 2019 Mingde (Matthew) Zeng ;; Created: Tue Mar 19 09:20:19 2019 (-0400) ;; Version: 3.0 ;; URL: https://github.com/MatthewZMD/.emacs.d ;; Keywords: M-EMACS .emacs.d shell shell-here ;; Compatibility: emacs-version >= 26.1 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; Commentary: ;; ;; This initializes shell-here, term-keys, multi-term, aweshell ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; This program is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or (at ;; your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, but ;; WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;; General Public License for more details. ;; ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; Code: (eval-when-compile (require 'init-const)) ;; ShellHerePac (use-package shell-here :bind ("M-~" . shell-here) :config (when *sys/linux* (setq explicit-shell-file-name "/bin/bash"))) ;; -ShellHerePac ;; MultiTermPac (use-package multi-term :load-path (lambda () (expand-file-name "site-elisp/multi-term" user-emacs-directory)) :commands (multi-term) :bind (("M-$" . multi-term) (:map dired-mode-map ("M-$" . multi-term))) :custom (multi-term-program (executable-find "bash")) (term-bind-key-alist '(("C-c C-c" . term-interrupt-subjob) ("C-c C-e" . term-send-esc) ("C-p" . previous-line) ("C-n" . next-line) ("C-m" . term-send-return) ("C-y" . term-paste) ("C-v" . scroll-up-command) ("M-v" . scroll-down-command) ("M-f" . term-send-forward-word) ("M-b" . term-send-backward-word) ("M-o" . term-send-backspace) ("M-p" . term-send-up) ("M-n" . term-send-down) ("M-M" . term-send-forward-kill-word) ("M-N" . term-send-backward-kill-word) ("" . term-send-backward-kill-word) ("" . term-send-backward-kill-word) ("M-r" . term-send-reverse-search-history) ("M-d" . term-send-delete-word) ("M-," . term-send-raw) ("M-." . comint-dynamic-complete)))) ;; -MultiTermPac ;; TermKeysPac (use-package term-keys :if (not (display-graphic-p)) :config (term-keys-mode t)) ;; -TermKeysPac ;; ExecPathFromShellPac (use-package exec-path-from-shell :if (memq window-system '(mac ns x)) :config (exec-path-from-shell-initialize)) ;; -ExecPathFromShellPac (provide 'init-shell) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; init-shell.el ends here