Eshell is a command shell written in Emacs Lisp.
Questions tagged [eshell]
99 questions
3
votes
1 answer
Output to stderr is instead going to stdout
I'm facing a weird problem; whenever I run a command in eshell (wether it is a simple command, a complex application or a toy example) every output which should go towards stderr goes to stdout instead.
This is an example:
#include
int…

bznein
- 908
- 7
- 21
3
votes
1 answer
Why do I get syntax error before: '{'?
While playing with Erlang getting started section
I have met bizarre syntax error on trivial use case (simple map initialization). Are there any suggestion why does that happen?
1> #{ "key" => 42}.
1: syntax error before: '{'
Details: Erlang…

Yehor Nemov
- 907
- 2
- 16
- 31
3
votes
1 answer
How can I include return codes and the command number in my eshell prompt?
I often have need of a shell while using Emacs. Recently, I have been trying to switch over from shell to eshell, so that I will be able to use the same commands regardless of platform.
One of the first things I would like to do is customize my…

Scott Weldon
- 9,673
- 6
- 48
- 67
3
votes
2 answers
Compiling Programs from Within Emacs?
What is the best way to compile programs inside emacs? I am currently opening a separate buffer with C-x 3 and running eshell inside it using M-x eshell then invoking either make or clang directly; most of the time I do have a Makefile set up.
Is…

haziz
- 12,994
- 16
- 54
- 75
2
votes
2 answers
How to define an alternate command for emacs eshell
I'm trying to start using eshell in place of bash within emacs, but I rely heavily on bash functions that I have written over the years. I'd like to configure eshell to invoke bash whenever a "command not found" condition occurs, in case the…

wytten
- 2,800
- 1
- 21
- 38
2
votes
1 answer
Eshell sudo does not accept option
In the eshell prompt the -E option can't be passe.
I end with the following error:
$ sudo -E gmake install
-E: command not found
Does someone have a solution to that?
Thanks

mathk
- 7,973
- 6
- 45
- 74
2
votes
3 answers
Why am I getting strange results with sed in eshell?
I was having trouble piping the results of a 'find' to sed. I simplified it to the simplest thing I could break, and I got this:
echo 1234567890abcdefghijklmnopqrstuvwxyz | sed 's/[:digit:]*/X/g'
I expected to get:
Xabcdefghijklmnopqrstuvwxyz
The…

Jonathan Adelson
- 3,275
- 5
- 29
- 39
2
votes
0 answers
eshell and color output
I am facing a strange behavior regarding the implementation of color for shell outputs when using eshell. This is the content of my .emacs:
(require 'xterm-color)
(require 'eshell)
(add-hook 'eshell-before-prompt-hook
(lambda ()
…

pgaluzio
- 168
- 2
- 6
2
votes
1 answer
emacs eshell grep on grep output
In eshell, one of the nice things is commands like grep's output will be redirected to Emacs special buffers. However, if I do a grep on previous grep, e.g.:
grep "abc" *.el | grep -v "ghi"
that output only appears in standard output. I'm wondering…

sudo
- 647
- 2
- 7
- 19
2
votes
2 answers
Eshell can't find script on eshell path
My goal
I'm trying to add "/opt/bin" to the list of paths eshell uses to find scripts. So far I've tried to do this in three ways
Attempts so far
1) (setenv "PATH" (concat "/opt/bin:" (getenv "PATH")))
2) (eshell/addpath "/opt/bin:")
3) (add-to-list…

user1854496
- 622
- 1
- 8
- 22
2
votes
1 answer
Emacs eshell - Kill window on exit
I have the following code in my init.el
;;open eshell
(defun eshell-other-window ()
(interactive)
(let ((buf (eshell)))
(switch-to-buffer (other-buffer buf))
(switch-to-buffer-other-window buf)
)
)
(global-set-key (kbd "C-t")…

Tornado547
- 231
- 2
- 10
2
votes
1 answer
How to copy Zsh aliases to Eshell
I'm trying to copy using the command provided in here. That is,
alias | sed -E "s/^alias ([^=]+)='(.*)'$/alias \1 \2 \$*/g; s/'\\\''/'/g;" >~/.emacs.d/eshell/alias
This worked with Bash, I was using Emacs-Starter-Kit; but not working with Zsh --…

Adeel Ansari
- 39,541
- 12
- 93
- 133
2
votes
2 answers
eshell TRAMP find remote file with relative path (or at least less than the full Tramp path)?
I love eshell's TRAMP integration. With it I can do cd /ssh:foo:/etc to
ssh into a remote machine and visit its /etc/ directory. I can also do
find-file motd to open this file in my local emacs. However, what if I need to use sudo to change the…

Stig Brautaset
- 2,602
- 1
- 22
- 39
2
votes
1 answer
How to use eshell's `ls -I` (`ls --ignore`) option?
Since i do not want to see some of files, i tried to use eshell's ls -I or ls --ignore option.
I first thought that it might behave like GNU ls --hide option but it's not.
It looks that eshell ls does not accept additional parameter.
Can someone…

Yung Hee
- 33
- 4
2
votes
1 answer
Cannot execute remote binary file in eshell
I connected Emacs to a virtual machine via Eshell, using Tramp. I tried to execute a binary file at the current directory, but Eshell cannot see that file, even though it is right there. The output returned is like…

Amumu
- 17,924
- 31
- 84
- 131