Questions tagged [eshell]
Eshell is a shell-like command interpreter implemented in Emacs Lisp.
226 questions
0
votes
1
answer
33
views
How to configure eshell prompt to correctly display working directory on remote host over TRAMP?
Running emacs -Q for emacs 29.4 (build 2, x86_64-w64-mingw32):
~/.ssh $ cd /ssh:oracle-root:/
/ssh:oracle-root:~/ $ pwd
/ssh:oracle-root:/home/opc/
/ssh:oracle-root:~/ $ /bin/pwd
/
There should be ~/...
1
vote
1
answer
32
views
Eshell cannot execute filesystem objects that are NTFS reparse points on Windows
None of the executables inside C:/Users/Me/AppData/Local/Microsoft/WindowsApps can be run from the command line under eshell.
The error I receive when trying to run any of these executables looks like:...
0
votes
1
answer
49
views
How to use the Emacs Lisp implementations of several UNIX commands in emacs (outside of eshell)
I am curious, is it possiblie to use the Emacs Lisp implementations of UNIX commands out side of eshell?
For example, can I point grep (or consult-grep) to eshell/grep (instead of the external program)...
0
votes
0
answers
43
views
How do I tell programs to show colors by default in eshell?
M-x eshell is working pretty well for me with windows, but I'm fighting colors.
eshell supports colors very nicely these days, but most programs don't recognize that by default.
I could, for example, ...
1
vote
2
answers
65
views
`eval` in eshell
I've been trying to run ssh-agent in eshell.
From what I understand, when you run the command ssh-agent, it starts the ssh agent and send to the stdout some information that should be incorporated as ...
0
votes
0
answers
40
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 ...
1
vote
2
answers
27
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 ...
0
votes
1
answer
88
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 ...
2
votes
2
answers
227
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 ...
0
votes
0
answers
221
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
1
answer
264
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.
0
votes
0
answers
43
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
49
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 ...
1
vote
1
answer
81
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, ...
0
votes
1
answer
102
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 ...
3
votes
1
answer
74
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)
(...
1
vote
1
answer
36
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 ...
2
votes
1
answer
522
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'"
...
1
vote
1
answer
259
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
2
answers
169
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 ...
0
votes
1
answer
48
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/...
1
vote
0
answers
28
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 ...
3
votes
1
answer
723
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
4
answers
368
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/...
1
vote
1
answer
227
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
2
answers
121
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 ...
1
vote
0
answers
131
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 ...
0
votes
1
answer
59
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 ...
1
vote
1
answer
235
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
2
answers
268
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)...
0
votes
1
answer
115
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
92
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
222
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
349
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
288
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 ...
0
votes
1
answer
54
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-...
0
votes
1
answer
84
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"
...
0
votes
0
answers
149
views
Emacs shell make a new shell in a new numbered *shell<n>* buffer, same window
I updated from emacs 27 to emacs 29, and I find that now when I run
M-x shell
It overwrites the file/buffer I am currently using with a new shell, rather than starting a new shell in the current ...
2
votes
1
answer
587
views
eshell: activate Python virtual environment from command prompt
I am aware of additional Lisp libraries that are able to activate a Python virtual environment without typing the following from an eshell command prompt: source /path/to/virtualenv/bin/activate. ...
0
votes
0
answers
110
views
eshell - completion-at-point sometimes add an extra space after selecting
for example, in eshell, I have
cd ~/Download/some$
where $ is where the cursor is. If I type Tab to invoke completion-at-point, after selecting the completion candidate, it would add one white space ...
1
vote
0
answers
63
views
How to rename files to numbers in Eshell?
List of files:
$ ls -1 *.jpg
IMG_20210909_0003.jpg
IMG_20210909_0004.jpg
IMG_20210909_0005.jpg
IMG_20210909_0006.jpg
IMG_20210909_0007.jpg
…
I want to rename these files to 1.jpg, 2.jpg, …, and I ...
1
vote
2
answers
181
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 $...
1
vote
1
answer
225
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 ...
0
votes
1
answer
2k
views
Emacs icons not appearing as expected
I am having some issue implementing a custom eshell prompt found here but I am having issue with icons. For some reason, I have not been able to get any of the icons using the unicode provided, most ...
1
vote
2
answers
589
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 ...
0
votes
1
answer
132
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
1
answer
67
views
The Emacs eshell alias of CMake doesn't recognize path correctly?
I'm using the Emacs eshell's alias feature to make an alias to the cmake command like below:
$ alias cmake 'cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1'
The alias is created correctly, here is the output ...
1
vote
1
answer
124
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 ...
2
votes
3
answers
1k
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 ...
2
votes
1
answer
519
views
How to set env values for eshell in emacs on macOS?
If use iTerm on macOS, we can set env values in its terminal. It also set path such as /usr/local/bin/ in ~/.bashrc.
But in emacs' terminal as eshell, run kubectl shown kubectl: No such file or ...