453 |
|
|
454 |
(defun eshell-rewrite-named-command (terms) |
(defun eshell-rewrite-named-command (terms) |
455 |
"If no other rewriting rule transforms TERMS, assume a named command." |
"If no other rewriting rule transforms TERMS, assume a named command." |
456 |
(list (if eshell-in-pipeline-p |
(let ((sym (if eshell-in-pipeline-p |
457 |
'eshell-named-command* |
'eshell-named-command* |
458 |
'eshell-named-command) |
'eshell-named-command)) |
459 |
(car terms) |
(cmd (car terms)) |
460 |
(and (cdr terms) |
(args (cdr terms))) |
461 |
(append (list 'list) (cdr terms))))) |
(if args |
462 |
|
(list sym cmd (append (list 'list) (cdr terms))) |
463 |
|
(list sym cmd)))) |
464 |
|
|
465 |
(eshell-deftest cmd named-command |
(eshell-deftest cmd named-command |
466 |
"Execute named command" |
"Execute named command" |