diff options
Diffstat (limited to 'lisp/eshell/em-unix.el')
-rw-r--r-- | lisp/eshell/em-unix.el | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el index 3967817b0ed..40b83010f94 100644 --- a/lisp/eshell/em-unix.el +++ b/lisp/eshell/em-unix.el @@ -755,26 +755,21 @@ external command." (eshell-stringify-list (flatten-tree args))) " ")) - (cmd (format "%s -nH %s" - (pcase command - ("egrep" "grep -E") - ("fgrep" "grep -F") - (x x)) - args)) + (cmd (format "%s -n %s" command args)) compilation-scroll-output) (grep cmd))))) (defun eshell/grep (&rest args) "Use Emacs grep facility instead of calling external grep." - (eshell-grep "grep" args t)) + (eshell-grep "grep" (append '("-H") args) t)) (defun eshell/egrep (&rest args) "Use Emacs grep facility instead of calling external grep -E." - (eshell-grep "egrep" args t)) + (eshell-grep "grep" (append '("-EH") args) t)) (defun eshell/fgrep (&rest args) "Use Emacs grep facility instead of calling external grep -F." - (eshell-grep "fgrep" args t)) + (eshell-grep "grep" (append '("-FH") args) t)) (defun eshell/agrep (&rest args) "Use Emacs grep facility instead of calling external agrep." @@ -968,7 +963,7 @@ Show wall-clock time elapsed during execution of COMMAND.") (if eshell-diff-window-config (set-window-configuration eshell-diff-window-config))) -(defun nil-blank-string (string) +(defun eshell-nil-blank-string (string) "Return STRING, or nil if STRING contains only blank characters." (cond ((string-match "[^[:blank:]]" string) string) @@ -999,7 +994,7 @@ Show wall-clock time elapsed during execution of COMMAND.") (condition-case nil (diff-no-select old new - (nil-blank-string (eshell-flatten-and-stringify args))) + (eshell-nil-blank-string (eshell-flatten-and-stringify args))) (error (throw 'eshell-replace-command (eshell-parse-command "*diff" orig-args)))) @@ -1049,6 +1044,8 @@ Show wall-clock time elapsed during execution of COMMAND.") (put 'eshell/occur 'eshell-no-numeric-conversions t) +(define-obsolete-function-alias 'nil-blank-string #'eshell-nil-blank-string "29.1") + (provide 'em-unix) ;; Local Variables: |