3

As I understood from the documentation of Eshell, every time that a command will be executed, it will be executed internally in Eshell/Emacs. When it gives an error code, then the command will be passed to the real shell, and the output of that command will be passed to Eshell.

So I began to wonder why the command type is not working in Eshell? In the terminal emulator, type sh gives me:

sh is /bin/sh

But in Eshell, it gives me the following:

("sh"): command not found

If the command is not found, it would be passed anyway to the real shell, right? I fail to understand why this gets stucked.

6

When it gives an error code, then the command will be passed to the real shell

No, eshell is the "real shell". If there no such internal command, then eshell will look for an external command of the same name (this is what all shells do). type is not an external command, it's an internal command of some other shells (try running type type in your terminal emulator).

  • TIL type is not a external command, but an feature of the shell itself. Thanks for clarifying it! – ReneFroger May 5 '16 at 15:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.