| @@ -1681,9 +1681,14 @@ Optional prefix ARG says how many lines to unflag; default is one line." | |||||
| (defun eshell/clear () | (defun eshell/clear () | ||||
| "Clear the current buffer, leaving one prompt at the top." | "Clear the current buffer, leaving one prompt at the top." | ||||
| (interactive) | |||||
| (let ((inhibit-read-only t)) | (let ((inhibit-read-only t)) | ||||
| (erase-buffer))) | (erase-buffer))) | ||||
| (defun eshell-clear () | |||||
| (interactive) | |||||
| nil) | |||||
| (defun eshell/d (&optional dirname switches) | (defun eshell/d (&optional dirname switches) | ||||
| "if first arg is omitted open current directory." | "if first arg is omitted open current directory." | ||||
| (dired (or dirname ".") switches)) | (dired (or dirname ".") switches)) | ||||
| @@ -1759,6 +1764,16 @@ if arg given, use that eshell buffer, otherwise make new eshell buffer." | |||||
| (insert "cd " dir) | (insert "cd " dir) | ||||
| (eshell-send-input)))) | (eshell-send-input)))) | ||||
| (defadvice eshell-next-matching-input-from-input | |||||
| ;; do not cycle history | |||||
| (around eshell-history-do-not-cycle activate) | |||||
| (if (= 0 | |||||
| eshell-history-index) | |||||
| (progn | |||||
| (delete-region eshell-last-output-end (point)) | |||||
| (insert-and-inherit eshell-matching-input-from-input-string)) | |||||
| ad-do-it)) | |||||
| (setq eshell-directory-name "~/.emacs.d/eshell/") | (setq eshell-directory-name "~/.emacs.d/eshell/") | ||||
| (setq eshell-term-name "eterm-color") | (setq eshell-term-name "eterm-color") | ||||
| (setq eshell-scroll-to-bottom-on-input t) | (setq eshell-scroll-to-bottom-on-input t) | ||||
| @@ -1812,12 +1827,14 @@ if arg given, use that eshell buffer, otherwise make new eshell buffer." | |||||
| 'eshell-kill-input) | 'eshell-kill-input) | ||||
| (define-key eshell-mode-map (kbd "C-d") | (define-key eshell-mode-map (kbd "C-d") | ||||
| 'eshell-delete-char-or-logout) | 'eshell-delete-char-or-logout) | ||||
| (define-key eshell-mode-map (kbd "C-l") | |||||
| 'eshell/clear) | |||||
| (define-key eshell-mode-map (kbd "DEL") | (define-key eshell-mode-map (kbd "DEL") | ||||
| 'my-eshell-backward-delete-char) | 'my-eshell-backward-delete-char) | ||||
| ;; (define-key eshell-mode-map | |||||
| ;; (kbd "C-p") 'eshell-previous-matching-input-from-input) | |||||
| ;; (define-key eshell-mode-map | |||||
| ;; (kbd "C-n") 'eshell-next-matching-input-from-input) | |||||
| (define-key eshell-mode-map | |||||
| (kbd "C-p") 'eshell-previous-matching-input-from-input) | |||||
| (define-key eshell-mode-map | |||||
| (kbd "C-n") 'eshell-next-matching-input-from-input) | |||||
| (apply 'eshell/addpath exec-path) | (apply 'eshell/addpath exec-path) | ||||
| (set (make-local-variable 'scroll-margin) 0) | (set (make-local-variable 'scroll-margin) 0) | ||||
| @@ -1870,7 +1887,7 @@ if arg given, use that eshell buffer, otherwise make new eshell buffer." | |||||
| "*Messages*"))) | "*Messages*"))) | ||||
| (defun make-frame-command-with-name (name) | (defun make-frame-command-with-name (name) | ||||
| "Make frame with name specified." | |||||
| "Make frame with NAME specified." | |||||
| (interactive "sName for new frame: ") | (interactive "sName for new frame: ") | ||||
| (set-frame-parameter (make-frame-command) | (set-frame-parameter (make-frame-command) | ||||
| 'name | 'name | ||||