Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [eshell]

Eshell is a shell-like command interpreter implemented in Emacs Lisp.

Filter by
Sorted by
Tagged with
41 votes
4 answers
8k views

Weird shell output when using IPython 5

I just upgraded to the latest version of IPython and now something is wrong when using it in emacs. When using it in a regular terminal it works fine (colors, tab-completion, etc.), however either ...
Literal's user avatar
  • 675
28 votes
1 answer
1k views

What are all the ways of launching a shell from inside emacs and what are their various properties?

I know of at least four possibilities: eshell term ansi-term shell What's the complete list of tools built-in to emacs to launch a shell, and what benefits and drawbacks do they offer?
Trevoke's user avatar
  • 2,450
10 votes
4 answers
5k views

How to programmatically execute a command in eshell?

I want to execute simple commands in eshell without explicitly typing them into the prompt, using something like with-current-buffer How can I do this?
caisah's user avatar
  • 4,096
0 votes
4 answers
277 views

How to make changes on variables' values be persistent over sessions?

The current question is related to a previous question which is still not fully solved. I have been doing the following: 1 - After executing describe-variable over exec-path, I get: ("/opt/...
Pedro Delfino's user avatar
12 votes
1 answer
4k views

How do I make tramp+eshell use my environment customized in the remote ~/.bash_profile

I have set up custom $PATH in my ~/.bash_profile on a remote machine (for programs installed user-locally by nix and cabal). I use eshell and tramp to issue commands on the remote machine (cd /...
imz -- Ivan Zakharyaschev's user avatar
12 votes
7 answers
7k views

How to clear the eshell

After looking at this answer I find it hard to believe there is no way to clear the eShell. Does anybody know of a short function or method to delete the entire buffer. Pressing C-l just scrolls the ...
Startec's user avatar
  • 1,344
9 votes
3 answers
3k views

How to make terminal/shell spawned inside Emacs running on a Mac inherit the environment variables of the native terminal?

The terminal natively on Mac i.e. spawned through Spotlight or Launchpad, adopts the desired environment variables including the customization in ~/.bash_profile. But when I run Emacs (Emacs.app taken ...
Bleeding Fingers's user avatar
8 votes
5 answers
8k views

Configuration of eshell. Running programs from directories in PATH env variable

How can I configure eshell to be able to run programs from directories in PATH env variable? How can I add additional custom directories to the list? I use Emacs 24.3.1.
whysoserious's user avatar
8 votes
1 answer
7k views

Emacs can't find Node when Node was installed using NVM

I've got Node installed using NVM, and Emacs (v25.2.1) isn't able to find Node. When I run M-: (executable-find "node") I get back nil. However, when I run M-: (executable-find "cat") I get "/bin/cat"...
user2245766's user avatar
8 votes
1 answer
998 views

Setting E-Shell Alias

In my emacs alias file located at .emacs.d/eshell/alias, I have the following: alias mv mv -v $* Whenever I execute the alias in eshell, for example: mv from_here.txt to_here.text, I get the error: ...
Ari's user avatar
  • 339
6 votes
2 answers
128 views

How to tell eshell to use the os-specific tools if available

I understand why eshell provides elisp interpretations of the kill and rm commands, however, I would like Emacs to use the operating-specific implementations if they are available in the $PATH (...
Lee H's user avatar
  • 2,737
6 votes
2 answers
1k views

How to remove alias from the eshell?

I recently created the alias in eshell: alias hello 'echo "Hello World"' So now whenever I type hello: I am very used to creating temporary alias in the Terminal for more subtle use. And then ...
programking's user avatar
  • 7,234
5 votes
1 answer
642 views

emacsclient directly start eshell command command line

Both of the following work to call a graphical/terminal eshell: emacs -f eshell emacs -nw -f eshell Furthermore, this 2-step process also works: `emacsclient -t -a '' /some/real/file/name Metax ...
Alex Stragies's user avatar
5 votes
1 answer
1k views

Eshell doesn't reuse TRAMP connection for remote subprocesses

I was trying to operate on remote host using eshell and was disappointed to discover that majority of operations would hang emacs for several seconds. I found it surprising considering that normally ...
mpontus's user avatar
  • 429
5 votes
3 answers
8k views

How to open `shell` or `eshell` in a new window or frame

By M-x eshell or M-x shell Emacs opens a shell or an eshell in the current window. How to open this shell or eshell in a new window?
Name's user avatar
  • 7,871
4 votes
1 answer
508 views

How does comint-mode override beginning of line behavior? I want same functionality to eshell

My Emacs version is 24.5.1. Comint-mode protects the prompt by somehow defining the beginning of line to start directly after the prompt regex. This works for normal motion commands like move-...
Martin Yrjölä's user avatar
4 votes
1 answer
137 views

remote tramp eshell session changes to localhost

I start a tramp dired session to a remote host with C-x d /ssh:user@host:/ and then start eshell with M-x eshell. This places me at the dired path on the remote host, however as soon as I try to cd ...
retrodev's user avatar
  • 295
3 votes
1 answer
695 views

emacs start with eshell focused using .emacs config file

It's possible to start emacs with an eshell buffer focused using the -f flag as described in this question. > emacs -nw -f "eshell" I'm wondering if there's a way of launching eshell and focusing ...
Greg Nisbet's user avatar
2 votes
1 answer
404 views

What's eshell's syntax for command substitution?

for pid in $(ps -ef | grep "chrome" | awk '{print $2}'); do kill -9 $pid; done Invalid read syntax: ")" What's the right way to run this script in Eshell?
Nick's user avatar
  • 4,493
2 votes
4 answers
1k views

Command to Run (Eval) "Hello World" in ELISP on Eshell?

I am new to Emacs and ELISP A file (message "Hello World") saved as hello.el. Now, how to run (evaluate) this file on Eshell? ~/Documents $ ....... hello.el
Tom's user avatar
  • 29
2 votes
1 answer
166 views

Can't parse the output of manpages in pcmpl-args.el in Emacs 25.1.1

This is a followup to this question, as I originally was uncertain as to how to make this question into a suitable format for this site. So, I'm a user of pcmpl-args.el, which is an Emacs package that ...
GDP2's user avatar
  • 1,350
1 vote
1 answer
192 views

Why are Emacs Eshell and macOS default terminal showing different results for the same query on a program (SDKMAN) version?

I am using Emacs (config file) on macOS Monterey (12.5). There is something that I do not understand. After being queried on a specific version of the program called sdkman sdk, eshell and macOS ...
Pedro Delfino's user avatar
1 vote
1 answer
193 views

eshell last exit code in prompt

My Emacs version is: GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0) I have modified my eshell prompt as follows: (defun set-eshell-prompt-function () (setq ...
Zelphir Kaltstahl's user avatar
1 vote
2 answers
696 views

Customize eshell redirection to buffer

In eshell I can redirect the output of a command (foo) to a buffer (bar) by inputting: foo > #<buffer bar> I want to customize this syntax the following way: foo > #bar Is it possible ...
rph's user avatar
  • 335
1 vote
1 answer
259 views

How to use Emacs to open an eshell from Terminal at a specific path

By default, if I invoke emacs from terminal by typing $ emacs C:\users a directory-like environment opens. Then if I do M-x eshell, an eshell environment opens at this path. My question is how to ...
Name's user avatar
  • 7,871
1 vote
2 answers
246 views

Eshell and Dired are unable to extract port number from authinfo file

My default-directory is: /ssh:[email protected]#2222:/home3/lawlist My .authinfo file contains: machine 12.34.567.89 login lawlist password abcdefg The above-combination works just fine. ...
lawlist's user avatar
  • 19.2k
0 votes
2 answers
249 views

eshell should use bash_aliases

I want my eshell to use ~/.bash_aliases. But it seems that it doesn't because my usual aliases do not work. This is my full minimal config using use-package: ;; === Package setup === (require 'package)...
buhtz's user avatar
  • 729
0 votes
1 answer
43 views

Emacs shell - git diff not displaying inserted ("+") lines with dos file endings and color

If I modify a file checked into version control with DOS line endings, on a normal terminal I can see the change: # Normal terminal... $ git diff diff --git a/a b/a index c113281..85c3ecd 100644 --- a/...
John Graham's user avatar