Why doesn't the following work in eshell
$ (echo "foo")
Symbol's function definition is void: echo
What I tried:
googled eshell parenthesis not working
More Context:
Eventually I'm trying to run (source functions.sh; myCoolFunc)
Why doesn't the following work in eshell
$ (echo "foo")
Symbol's function definition is void: echo
What I tried:
googled eshell parenthesis not working
More Context:
Eventually I'm trying to run (source functions.sh; myCoolFunc)
You incorrectly assumed that eshell
starts your default shell
specified in /etc/passwd
but it doesn't, it's a shell on its
own:
Eshell is a shell-like command interpreter implemented in Emacs Lisp. It invokes no external processes except for those requested by the user. It is intended to be an alternative to the IELM (see Emacs Lisp Interaction) REPL for Emacs and with an interface similar to command shells such as bash, zsh, rc, or 4dos.
The source
command you want to run does not work with bash
files
in eshell
as you would expect it but with eshell
commands as help
mentions:
~ $ source -h
usage: source FILE [ARGS]
Invoke the Eshell commands in FILE in a subshell, binding ARGS to $1,
$2, etc.
-h, --help show this usage screen
In order to achieve what you want in eshell
buffer you need to start
bash
manually:
M-x eshell
~ $ bash
$ (echo hi)
hi
eshell
at all.
– Arkadiusz Drabczyk
Dec 29 '17 at 7:47