Questions tagged [eshell]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
17 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
0answers
46 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 ...
0
votes
1answer
27 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
0answers
18 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 ...
0
votes
0answers
57 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
1answer
43 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 ...
0
votes
1answer
65 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
0answers
20 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
0answers
71 views

How to use nvm with spacemacs?

How can I use nvm with spacemacs? I want to be able to access nvm from any shell in spacemacs. I have installed nvm and it works with no problem from the terminal. When I open some shells in ...
0
votes
0answers
28 views

How to prevent eshell from hijacking `*` after <TAB>

I start Emacs 27.1 with emacs -Q, invoke eshell, and then type ls foo<TAB>. I have many things starting with foobar in my directory, so it completes to foobar. So far, so good. In bash, I can ...
0
votes
1answer
28 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
0answers
29 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 ...
0
votes
1answer
57 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 ...
1
vote
1answer
120 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
2answers
56 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
0answers
39 views

Opening file after org-export in external program fails, but works with different invocation methods

I'm using emacs in Win10 WSL 2 Linux and call a custom script open in my $PATH to open files from WSL-Linux/emacs in Windows GUI. My .mailcap makes sure that the script is actually being used and the ...
0
votes
0answers
77 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
1answer
62 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 () (...
0
votes
1answer
65 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 ...
0
votes
1answer
52 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. => ...
1
vote
0answers
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 ...
0
votes
0answers
29 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 ...
1
vote
1answer
89 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 ...
0
votes
0answers
160 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 ...
2
votes
2answers
199 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 ...
0
votes
1answer
37 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 ...
0
votes
0answers
51 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 ...
0
votes
1answer
46 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 ...
3
votes
1answer
113 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
0answers
58 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 ...
0
votes
0answers
147 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) ...
1
vote
1answer
516 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&...
0
votes
1answer
107 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
1answer
132 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. ...
1
vote
1answer
98 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 ...
2
votes
1answer
124 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, ...
2
votes
1answer
197 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 ...
2
votes
1answer
222 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 ...
2
votes
1answer
260 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 ...
1
vote
0answers
164 views

Use Eshell with Tramp, from a Windows computer to a Linux server

I use a Windows computer to control servers through Tramp (with plink). Here's my setup: (setq explicit-shell-file-name "/bin/bash") (setq default-directory "/plink:user@server:~") Now when I run M-...
1
vote
1answer
146 views

Missing color support (for exa) in eshell

I just started using eshell. But the color support for some commands seems to be missing. For example I like to use the command exa, because of its nice colors. But in eshell it is all black.
1
vote
2answers
589 views

Terminal (shell) side by side with editor, how to navigate back and forth?

I am new to Emacs. I can invoke a shell or eshell using M-x shell or M-x eshell. This created a shell and I can run executables from it. By default, this shell is in the same window as my source ...
1
vote
1answer
210 views

how to do command substitution in eshell generally (NOT just for loop)

How to do command substitution à la Bash in Eshell, and not just for loops? (Unfortunately, while this question asks my question, its answer only provides Eshell for-loop syntax. So please don't dupe ...
1
vote
2answers
535 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
3answers
379 views

pdb within eshell up/down keys dont work

I am running python3 in eshell. When I use import pdb; pdb.set_trace() in my code, pdb opens within eshell. Everything works in pdb but the up/down keys don't work for running the previous command. ...
0
votes
0answers
152 views

Why eshell lists my host environment variables when I am connected to other machine via ssh?

I am connected to another machine using tramp and my eshell does send all the commands to remote machine but when I do echo $PATH it prints me my local PATH. Why?
1
vote
2answers
631 views

How to execute external commands from an Eshell script

I would like to create an elisp function such as (defun script() (run "bash" "-c" "echo 1; sleep 3; echo 2") (eshell-print "Done")) From an Eshell, its execution should look like: eshell $ ...
0
votes
1answer
27 views

comint: show the original input when match-cycling through history

Currently, I have bindings for comint-previous-matching-input-from-input and comint-next-matching-input-from-input. My problem is this. Suppose I am on a prompt with some text (say, "x = ") and issue ...
0
votes
2answers
663 views

How to redirect output from eshell to any open buffer in Emacs?

I have my eshell opened in a window and in another window I have *Scratch* as a open buffer. I want to redirect the output of a command like say ls to *Scratch*. Is it possible? If yes, then how can I ...
3
votes
2answers
100 views

grep -l: Shouldn't I be able to load the files?

Example in eshell: $ cd ~/src/Sporth $ grep -rl Name * I get as output: -*- mode: grep; default-directory: "~/src/Sporth/" -*- Grep started at Fri Feb 1 17:07:41 grep -n -rl Name LICENSE Makefile ...