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
4 votes
3 answers
1k views

How to store an eshell alias in `init.el`?

I like to keep my configuration as self-contained as possible, and I'm wondering whether there's a way to manage eshell aliases in my .emacs file. Is it possible to set up aliases with a function call ...
0 votes
1 answer
161 views

How to show colours and clear when running React development server in eshell?

Here is how the usual Ubuntu terminal looks when you run the React development serving using npm start and make changes to your source: Say the server was already running and you tried to do npm ...
0 votes
0 answers
15 views

How to expand yas-snippets in eshell (under Doom)

(This may have nothing to do with Doom-emacs, but because I use it, I should mention it) The famous "for-loop" expansion (https://xenodium.com/yasnippet-in-emacs-eshell/) does not work for ...
11 votes
2 answers
2k views

Attach to running remote shell with eshell/TRAMP/dtach

I often use GNU Screen to keep remote sessions alive. Since I live in Emacs, I'd really like to be able to resume a running remote shell session from within Emacs. GNU Screen implements all sorts of ...
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?
1 vote
2 answers
22 views

Emacs eshell ls -d doesn't work

I would like to list just my folders (not files) with Emacs eshell. I tried ls -d . but it doesn't work. I can achieve this using with bash under term using ls -d */ but this doesn't work neither ...
4 votes
1 answer
1k views

Run interactive shell script in new buffer using elisp

I am looking for a way to display and interact with long running shell scripts in a separate buffer. While using eshell works, I'd like to automate most shell tasks using elisp. The best way I came ...
0 votes
1 answer
78 views

(set-eshell-alias!) for mv causes error: missing destination file or directory

In doom emacs, I'm setting some aliases in my config as follows: (set-eshell-alias! "ls" "exa --icons $*" "doomsync" "~/.emacs.d/bin/doom sync" ...
4 votes
2 answers
296 views

How to keep grep results in eshell buffer

When entering the grep command in an eshell in spacemacs, a separate window and buffer are created to list the grep output results. However, I would prefer for the output to be listed in the eshell ...
0 votes
1 answer
181 views

How to open a eshell buffer in a different window in doom emacs?

I want to open an eshell buffer in right side of the current window in the same frame.
1 vote
1 answer
178 views

Create orgmode agenda from remote directory recursively over ssh

I've set up a vserver with my directory containing various .txt files used as Org files and other files. Now I am trying to get my local Emacs build an agenda gathering all data from the remote files ...
1 vote
2 answers
489 views

How do I remove Welcome message and function message when sourcing

I am learning Emacs and I would like to know how to get rid of the Emacs Welcome to the Emacs shell and eshell/clear messages when I open a new eshell. I used this question to start an eshell at ...
2 votes
2 answers
207 views

How to make buffer recognize file moved?

Here's a simple use case: I open bar/foo/file in a buffer and I'm working. In eshell, I do mv bar/foo/file bar/baz/foo/file. Now emacs can no longer recognize where to save and doesn't save it ...
3 votes
1 answer
598 views

Why do I have Chinese/Mandarin characters in my mode-line and e-shell out of the blue? How do I fix this?

I have been using Emacs for a while. As you can see in my config file (whole file), there is a snippet to provide a Doom mode line: (use-package doom-modeline :init (doom-modeline-mode 1) :custom (...
0 votes
1 answer
62 views

Can eshell provide TRAMP auto-completion?

If I use find-file with a TRAMP method to navigate to a remote file in a docker or kubernetes container I'm provided with auto-completion: C-x C-f /docker:frosty_cori:/home In the example above, if I ...
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/...
8 votes
2 answers
745 views

eshell-visual-commands with tramp

I know that I can add commands to eshell-visual-commands to for example make it so when I run "top" it runs in a temporary ansi-term buffer instead of the eshell buffer, so that programs that rely on ...
0 votes
0 answers
154 views

org-latex-preview error on Windows: file was not generated please adjust dvisvgm part of org-latex-preview-process-alist

I have used org-mode before in Linux to generate LaTeX fragments very smoothly. I am using dvisvgm. Now, I have switched to Windows. I keep getting the error "file orgtex00000.dvi was not ...
0 votes
0 answers
155 views

How can I run WSL commands from Emacs running on Windows?

There are tons of articles on how to install GNU Emacs on WSL(2) and how to work within WSL2. However, I have Emacs installed on Windows1 and would like to access the file system and commands within ...
0 votes
0 answers
34 views

Random warning popping up occasionally when using eshell

I occasionally get this warning while running eshell: Warning (comp): tramp-loaddefs.el.gz:745:2478: Warning: reference to free variable ‘tramp-remote-path’ and was wondering how to fix it. According ...
0 votes
0 answers
38 views

Best way to get man to open in emacs by default

I currently have: man () { emacs -nw --eval "(man \"$1\")"; } in my .zshrc. However, this has the problem of not working with something like read(2) or command-line arguments to ...
3 votes
1 answer
62 views

How to reset the colors at the end of the Eshell prompt?

I have the following prompt customization for Eshell: (setq eshell-prompt-function (lambda () (let ((c "#fdd")) (let ((bc (lambda (str) (...
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 ...
4 votes
1 answer
391 views

(How) can I emulate {eshell,comint}-output-filter-functions in term?

What I want to do from inside a term shell is have a function called when there is new output or a certain regexp (e.g. a prompt) appears in in a term's output. The callback function should then be ...
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/...
0 votes
0 answers
42 views

eshell insert arguments from previous commands

I use M-. a lot to insert arguments of previous commands when using zsh/bash. Is there a built-in equivalent for eshell? I did a GH code search, and saw this was implemented by em-last and em-zle, ...
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 ...
1 vote
2 answers
165 views

Why can't I do this arithmetic operation on eshell? Error: "Symbol’s function definition is void: \,"

I am trying to run a simple addition operation in eshell. Trying with an illustrative minimal example: ~/$ (+ 1 -4) eshell returns: -3 Since the above operation worked out, I tried the real ...
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 ...
0 votes
1 answer
83 views

Use hs-minor-mode where it's not supported

I'd like to use hs-minor-mode is some buffers that are not related code editing, but still includes some structured data which I'd like to fold. For instance, in eshell I run a program with some debug ...
1 vote
1 answer
33 views

How to switch Ctrl-a and Home in Eshell?

I tried the following, but it does not work: (add-hook 'eshell-mode-hook (lambda () (local-set-key (kbd "C-a") #'move-beginning-of-line) (local-set-key (kbd ...
1 vote
2 answers
157 views

updated exec-path and path, binaries still not executable

I have several binaries I would like to call from eshell; I'm running into not-found-in-path errors. They are callable from a normal shell. Following the advice from the emacs wiki: ~/.emacs.d/config $...
0 votes
1 answer
53 views

How can I check whether the current buffer is an eshell buffer?

I'm trying to write a function which opens or closes an eshell window. So far I have: (defun bottom-window-eshell() (interactive) (let ((buf (eshell))) (switch-to-buffer (other-...
2 votes
1 answer
373 views

Is there any way of making eshell aliases using bash and zsh aliases syntax?

Let's say I have a file called .alias in my $HOME directory with the following content: alias "my-first-alias"="ls -lha" alias "my-second-alias="echo 'Hello World'" ...
2 votes
3 answers
955 views

Emacs can't find Node when Node was installed using NVM (again)

My question is similar to this question. I've installed node via nvm. (executable-find "node") returns .nvm/versions/node/v15.11.0/bin/node. Entering node on eshell drops me into a node ...
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"...
1 vote
1 answer
82 views

Trouble with Adjusting eShell Prompt and Tabbing

I've setup a custom prompt for eShell but, on doing tab completion (and pressing enter), the shell gets stuck at being read-only. I've noticed that, if I tab-complete something and then move the ...
1 vote
1 answer
199 views

eshell: Is there an existing method of redirecting output to a buffer and then show the buffer in the other window when done?

It seems like this would be a ubiquitous desire: capture the output of a command in eshell into a new buffer and when the command is completed, show the buffer in the other window. For example, I ...
1 vote
0 answers
27 views

Emacs Eshell alias is broken

Eshell: My long-standing very simple "ll" alias has somehow stopped working: $ eshell/which ll ll is an alias, defined as "ls -l $*" $ # correct $ *grep -w ll ~/.eshell/alias alias ...
0 votes
2 answers
90 views

After establishing a SSH connectia via eshell, "dumb" terminal can't run Emacs. Also vi does not work properly. How to solve this with Emacs?

After running eshell, I was trying to establish a SSH connection and do some changes on the server: ssh [email protected] The connection was successfully established (the real IP address was ...
0 votes
1 answer
102 views

translating bash functions to eshell

Try to move to eshell and I am wondering what the best solution to translating the bash functions like below to eshell? function cm-gen { cmake -B build -S . -DCMAKE_EXPORT_COMPILE_COMMANDS=ON $@ ...
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)...
1 vote
0 answers
110 views

How can I temporarily disable all (other) key bindings?

How can I write a command, and bind it to a key, so that when invoked it disables all key bindings other than the current key, until that same key binding is pressed again? The goal is to facilitate ...
1 vote
1 answer
207 views

Why does `eshell` not create an active process In Emacs while `shell` and `term` do?

In Emacs, the features shell, term, and eshell are different commands used for similar goals. When executed, shell and term create active processes in Emacs. I expected the same for eshell. However, ...
0 votes
1 answer
41 views

A comparitive analysis of shell, eshell, and term: what are the similiraties? What are the differences between them? When to use each of them?

This question was previously answered in Unix Stack Exchange. It has not been answered here, in Emacs Stack Exchange. I believe new answers in a community fully dedicated to Emacs could go deeper. But ...
0 votes
1 answer
103 views

Last line of eshell (in powerline theme) differ from the others

Here you see an Emacs 27 on Debian 11 with eshell using powerline as theme. But the current/last line doesn't use the powerline theme correct. I can not figuring out what could this be. This is the ...
1 vote
0 answers
79 views

How to fix the directory drive letter in eshell to run a NextJS project?

This bug is hard to describe, so I'll tell you how to recreate it. I'm on Windows 10, emacs 27.2, & node v16.13.0. Here are the steps: Open a default emacs (no init) with emacs -Q from powershell ...
3 votes
1 answer
176 views

How to change the directory where Eshell stores its history

There is a directory created (I am assuming) by Eshell in the Emacs folder by the name of, "eshell" containing files "history, lastdir." Is there a way to specify a different path ...
0 votes
0 answers
281 views

How to change the eshell path on Windows

When I open M-x eshell, and type things I recently added to path I get: node: command not found where node is the command that has been recently added. I've added the path to PATH on both the system ...
0 votes
1 answer
237 views

Tramp ssh connection inside eshell with gpg key

In my dotfiles I have the following setup to make ssh connections using my gpg key: .bash_profile: export GPG_TTY=$(tty) export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) gpgconf --launch ...

1
2 3 4 5