Questions tagged [eshell]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
26 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 ...
user avatar
  • 1
0 votes
1 answer
29 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 ...
user avatar
1 vote
1 answer
110 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, ...
user avatar
0 votes
2 answers
64 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)...
user avatar
  • 509
0 votes
1 answer
19 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 ...
user avatar
  • 509
1 vote
0 answers
24 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 ...
user avatar
1 vote
1 answer
38 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 ...
user avatar
  • 745
0 votes
0 answers
58 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 ...
user avatar
  • 1
0 votes
1 answer
75 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 ...
user avatar
  • 103
0 votes
1 answer
36 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-...
user avatar
0 votes
1 answer
25 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" ...
user avatar
0 votes
0 answers
37 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 ...
user avatar
1 vote
1 answer
67 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. ...
user avatar
  • 17.7k
0 votes
0 answers
36 views

Eshell/sudo doesn't remember password for apt

Referencing this post on how to let eshell remember sudo password, I've followed the steps in the answer, but sudo isn't remembering my passphrase. The following is occurs: $ sudo ls # prompted for ...
user avatar
0 votes
0 answers
30 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 ...
user avatar
1 vote
0 answers
49 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 ...
user avatar
  • 989
0 votes
1 answer
52 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 $...
user avatar
0 votes
0 answers
30 views

Python in eshell on Windows 10

I'm using Emacs v27.2 on Windows 10 and I would like to run Python inside eshell mode. It works in shell mode, because this is the native OS shell and I have Miniforge3 installed and in my PATH ...
user avatar
  • 133
0 votes
0 answers
74 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 ...
user avatar
0 votes
1 answer
163 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 ...
user avatar
  • 111
0 votes
1 answer
173 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 ...
user avatar
  • 111
0 votes
1 answer
33 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 $@ ...
user avatar
  • 1,330
0 votes
1 answer
34 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 ...
user avatar
  • 259
1 vote
0 answers
32 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 ...
user avatar
  • 23
1 vote
3 answers
255 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 ...
user avatar
1 vote
1 answer
241 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 ...
user avatar
  • 13
1 vote
2 answers
65 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?
user avatar
0 votes
0 answers
125 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 ...
user avatar
1 vote
1 answer
73 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 () (...
user avatar
  • 745
1 vote
1 answer
95 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 ...
user avatar
  • 11
0 votes
1 answer
91 views

Can `eshell-command` direct its output like `shell-command` into minibuffer?

=> When I do M-x shell-command and python run.py (which only print Hello World\nHello World string), I get the result on the minibuffer and when cursor moves up/down minibuffer is closed. => ...
user avatar
  • 1,046
1 vote
0 answers
24 views

How to get tilde and plus working with the eshell's directory stack

In zsh, when one creates a directory stack with pushd, one is able to reference directories in the stack using a tilde followed by the numerical index of the respective directory in the stack. One ...
user avatar
  • 1,578
1 vote
0 answers
42 views

/bin/top not found in eshell over ssh

How does eshell resolve its PATH? If I run my top in eshell on my local machine, it opens a new buffer and shows the output of the command in it. However, if I do the same on an eshell run on a remote ...
user avatar
  • 756
1 vote
1 answer
129 views

How to call Elisp functions from my own implementation of a shell?

I'm writing my own shell which can handle most of the GNU/Linux system calls now. So I was wondering if I could make this shell call Elisp functions too. Is it possible to do so? Is so, how do I get ...
user avatar
0 votes
0 answers
273 views

Disable evil-mode in eshell

I have disabled evil-mode in eshell by (evil-set-initial-state 'eshell-mode 'emacs) but when I switch windows(accidentally) using C-w k from eshell, evil-mode gets enabled. How do I prevent this ...
user avatar
2 votes
2 answers
258 views

Is there a better way of writing this with use-package?

I feel like there is a better way of writing this with use-package but I just can't get the usual way to work. (use-package eshell :hook (eshell-mode . (lambda () (define-key ...
user avatar
  • 745
0 votes
1 answer
40 views

echo $(echo $HOM) in eshell of win10 platform get void function reported

I am working on emacs-27.1 of windows 10. PS C:\Users\gaowei> emacs.exe --version GNU Emacs 27.1 Within the eshell, I tried: ~/.doom.d [master] λ which echo eshell/echo is a compiled Lisp function ...
user avatar
  • 1,089
0 votes
0 answers
78 views

is there a way to make compile shell process happen in eshell / "real" shell?

i wanted to bind a key to a compile and run command, then i found this post, Compile and run single file c++ programs in Emacs[SOLVED] ( last answer) It works perfectly fine and as intended. The only ...
user avatar
0 votes
1 answer
71 views

How to use arrow keys to select a menu item from an emacs shell buffer

It is getting more and more common for clis to have little embedded menus (for example the Ionic cli does this, but so do many others) which you navigate with the arrow keys. Please select the ...
user avatar
3 votes
1 answer
138 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 ...
user avatar
0 votes
0 answers
61 views

Cannot run executable in eshell

I have an executable (guix) in directory under home. I am using eshell. I add that directory to PATH. But when I run the command, the executable is not found. I have tried various methods such as ...
user avatar
  • 71
0 votes
0 answers
181 views

Send command to run in eshell, after compiled

So I've been mapping my M-x compile like this, according to c-mode-hook or c++-mode-hook: (add-hook 'c++-mode-hook (lambda () (set (make-local-variable 'compile-command) ...
user avatar
  • 285
1 vote
1 answer
757 views

Piping contents of buffer into eshell command

I know eshell supports output redirection to buffers cmd > #<buffername> Is there a way to do piping buffer contents into command? I would like to have something like cat #<buffername&...
user avatar
  • 93
0 votes
1 answer
128 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 ...
user avatar
  • 745
0 votes
1 answer
179 views

Eshell - enable type text in any place

Emacs 26.1, Windows 10 (64 bit) M-x eshell Here result: But it's read only. But I need to type text in any place in any place in eshell. Also I want to move cursor in any place in eshell buffer. ...
user avatar
  • 3,435
1 vote
1 answer
137 views

Error in custom eshell function (exit and close window)

I got the below function from an article on howardism.org. Its purpose is to exit eshell and close the corresponding window. ;; GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.10) of ...
user avatar
  • 13
2 votes
1 answer
139 views

eshell grep thinks options are patterns on windows

I'm using Emacs on windows, and was trying to run grep from within eshell (M-x eshell). The default shell through M-x is cmd.exe, but eshell has linux utilities so I'm trying to use eshell. Now, ...
user avatar
  • 103
2 votes
1 answer
237 views

Am I missing something on eshell piping to an elisp function?

I use emacs on a lot of different types of machines during the day, so I'm toying with writing some elisp scripts to avoid managing 4 scripting environments. Specifically, I'm writing an elisp ...
user avatar
  • 121
2 votes
1 answer
304 views

How to launch term at startup in Emacs?

I need to have Emacs open a terminal at start-up automatically (in order to use Fish in the terminal and use Emacs to for example search the Fish output). Normally I do this with 'M-x term'. Is ...
user avatar
2 votes
1 answer
346 views

How do I make file paths clickable/navigable in Shell as described in the documentation?

For the life of me, I cannot get this functionality to work: https://wikemacs.org/wiki/Shell#Make_file_paths_clickable I've run (add-hook 'shell-mode-hook 'compilation-shell-minor-mode) in my .emacs ...
user avatar
  • 339

1
2 3 4 5