summaryrefslogtreecommitdiff
path: root/lisp/eshell/em-alias.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/eshell/em-alias.el')
-rw-r--r--lisp/eshell/em-alias.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/eshell/em-alias.el b/lisp/eshell/em-alias.el
index 85e4e97e692..a407bf5deb8 100644
--- a/lisp/eshell/em-alias.el
+++ b/lisp/eshell/em-alias.el
@@ -151,7 +151,12 @@ command, which will automatically write them to the file named by
(add-hook 'eshell-alternate-command-hook 'eshell-fix-bad-commands t t)
(eshell-read-aliases-list)
(make-local-hook 'eshell-named-command-hook)
- (add-hook 'eshell-named-command-hook 'eshell-maybe-replace-by-alias t t))
+ (add-hook 'eshell-named-command-hook 'eshell-maybe-replace-by-alias t t)
+ (make-local-variable 'eshell-complex-commands)
+ (add-to-list 'eshell-complex-commands 'eshell-command-aliased-p))
+
+(defun eshell-command-aliased-p (name)
+ (member name eshell-command-aliases-list))
(defun eshell/alias (&optional alias &rest definition)
"Define an ALIAS in the user's alias list using DEFINITION."