Questions tagged [eshell]
Eshell is a shell-like command interpreter implemented in Emacs Lisp.
222
questions
0
votes
1
answer
37
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 ...
1
vote
2
answers
140
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
48
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
56
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
42
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
30
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
30
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 ...
0
votes
0
answers
36
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
47
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
45
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
25
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 ...
0
votes
0
answers
13
views
Why is a git grep command on eshell generating an infinite process, a "Stack overflow in regex matcher" error, and a mini-buffer password request?
I decided to execute a grip grep -i "rcls" command on my emacs she'll.
I tried that first on my iTerm2 terminal, and got this result:
Since it was a bit boring to keep hitting down arrow ...
0
votes
0
answers
40
views
Is there an Eshell syntax highlight mode for editing Eshell code?
There is a minor mode to highlight syntax in the eshell command buffer: https://github.com/akreisher/eshell-syntax-highlighting.
However, I cannot find a highlight mode for the eshell code editing ...
2
votes
1
answer
233
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
115
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
154
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
34
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
24
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 ...
2
votes
2
answers
289
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
156
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
127
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
64
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
0
answers
74
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
36
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
190
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
183
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
75
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
66
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
132
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
207
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
184
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
51
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
64
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
86
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
330
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
88
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
53
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
122
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
158
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
1k
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
1
answer
392
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
59
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
44
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
48
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
649
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
436
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 ...
1
vote
2
answers
83
views
why do i get random "^[" when using eshell?
Using Eshell and the SSH command, I've logged on to a remote server. After installing a few server packages I noticed this strange thing:
Why is this happening? What can I do to prevent it?
0
votes
0
answers
240
views
`sudo !!` in eshell?
I was wondering how you could get the equivalent of sudo !! in eshell. I cant tell you the amount of times I have done this forgetting eshell doesn't have this feature built in.
I have looked through ...
1
vote
1
answer
101
views
Why do these two different use-package declarations (for the same package) have different effects?
What I want to accomplish is to add a keybinding C-<backspace> to the eshell-mod-map that calls func. That can be done like this,
(use-package eshell
:init
(defun add-func-keybinding ()
(...
1
vote
1
answer
152
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 ...