Questions tagged [eshell]

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

Filter by
Sorted by
Tagged with
1
vote
0answers
33 views

Does eshell support directory-stack expansion ala bash?

Does eshell support directory-stack expansion ala bash ? bash> pushd dir bash> ls ~-1 <Outputs contents of dir>
4
votes
1answer
263 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 ...
7
votes
1answer
421 views

Setting E-Shell Alias

In my emacs alias file located at .emacs.d/eshell/alias, I have the following: alias mv mv -v $* Whenever I execute the alias in eshell, for example: mv from_here.txt to_here.text, I get the error: ...
3
votes
1answer
106 views

Saving raw ANSI escape codes in M-x shell, M-x eshell, or M-x term

Each of M-x shell, M-x eshell, and M-x term in Emacs lets me save the buffer to a text file. But the terminal colors are not saved. How do I save the raw ANSI escape sequences too?
1
vote
1answer
115 views

Is there a way to use strings to name eshells

I know a numeric prefix will create (or switch to) a new eshell session with that number. Is there a way to assign a string instead of a number? For example, normally I get the following: *eshell*&...
0
votes
2answers
382 views

How to do 'Hello World' in Emacs-LISP on Eshell and display evaluation in shell area itself, instead of echo area or *message* Buffer?

I am new to Emacs and struggling to learn it. How to get rid of the line Emacs: command not found? ~/Documents $ eshell-source-file hello.el Emacs: command not found Hello World ~/...
4
votes
1answer
478 views

Better aliases in eshell

I'm trying to translate some useful aliases from zsh to eshell (because ansi-term sucks). This is one such alias: alias l "ls -lAh $*" I want this to be able to receive any number of arguments (...
2
votes
4answers
669 views

Command to Run (Eval) “Hello World” in ELISP on Eshell?

I am new to Emacs and ELISP A file (message "Hello World") saved as hello.el. Now, how to run (evaluate) this file on Eshell? ~/Documents $ ....... hello.el
1
vote
1answer
263 views

utf-8 characters with eshell, eshell-visual-subcommands, and git

Using the configuration (eval-after-load "em-term" '(progn (add-to-list 'eshell-visual-subcommands '("git" "diff" "help" "log" "show")) (add-to-list 'eshell-visual-options '("git" "--help"...
0
votes
2answers
215 views

How to exit Man mode - Why does this function break eshell/man-mode?

I can't seem to find the keybinding for closing a buffer after running man in eshell. C-h b doesn't help. Neither does killing a man buffer, because eshell is unresponsive afterwards. What am I ...
4
votes
1answer
316 views

How to mix eshell and elisp code

If I'm in eshell I can run elisp commands cause I'm in an elisp runtime (mapcar (lambda (x) (* x 3)) (list 1 2 3)) (3 6 9) I can also run "shell" commands such as git status. But what if I wanted to ...
2
votes
1answer
553 views

Is there a mode-hook when you switch to a buffer in Eshell mode

For my function, that I have created, I'm looking for an Eshell mode hook. I'm aware of the following hook: (add-hook 'eshell-mode-hook 'my-function-for-eshell). But what when I'm in a other ...
2
votes
1answer
668 views

No colors for eshell?

I have the following in my code to customize eshell: (setq eshell-prompt-function (lambda nil (concat (propertize (eshell/pwd) 'face `(:foreground "blue")) (propertize " $ " 'face `(:...
5
votes
0answers
206 views

How to make eshell recognize path to files and make it clickable?

In the compilation environment in emacs (M-x compile), whenever there is a path to file (ex.: ../src/code.cpp:21:3: warning: comparison between...) it highlights the path and make it clickable. When ...
2
votes
0answers
153 views

How to wait for command execution to complete in eshell

I guess I don't quite understand how to write commands for eshell. I am using the form: (defun eshell/command ()" " (interactive) (insert "command") (eshell-send-input)) When I do this it prints ...
1
vote
1answer
150 views

Wrong encoding in eshell when closing Emacs

I have a lot of filenames in Russian in my file system. Every time I close Emacs if I had eshell opened, it shows a *temp* buffer with a list of directories. And asks 2 questions: Select coding ...
1
vote
2answers
175 views

Eshell and Dired are unable to extract port number from authinfo file

My default-directory is: /ssh:lawlist@12.34.567.89#2222:/home3/lawlist My .authinfo file contains: machine 12.34.567.89 login lawlist password abcdefg The above-combination works just fine. ...
2
votes
1answer
114 views

How to prevent eshell interpret bash shell command?

I want to execute the source shell command from the eshell environment in Emacs. But the source is also a lisp function, so the two command confilicts, and eshell always execute the source function, ...
1
vote
1answer
421 views

Eshell — how to use authinfo for login credentials

Tramp with dired-mode can use the authinfo file to automatically login. This avoids setting up keys in the .ssh directory and also on the remote server. Q:  How can I modify the behavior of eshell ...
0
votes
1answer
243 views

Can't open eshell in spacemacs

I am new to emacs/spacemacs and I saw some really cool videos and read through some articles and I really want to get it working. when I hit SPC + ' it says "SPC ' is undefined" Anyone know how to ...
1
vote
1answer
717 views

Define custom keys only for eshell

I'm struggling to find a way to define keys only for eshell. Looking at the emacs wiki I saw examples using the eshell-mode-map yet I get errors when trying to define it. progn: Symbol’s value as ...
1
vote
1answer
158 views

How to complete `..` to `../` in eshell

A BASH completes .. to ../ when pressing tab, that is, it just adds a forward slash. Tiny as it might seem, I'm so used to this behaviour that I desperately miss it in eshell. Is there a way to add it?...
2
votes
0answers
91 views

Evaluation of .dir-locals.el in shell?

I observed that directory local variables, defined in .dir-locals.el, are set for files, dired-buffers, new buffers, but not for shell or eshell buffers (well, that is also the case for buffers ...
4
votes
2answers
786 views

eshell goes to the bottom of the page after executing a command

when I execute a command on eshell the prompt switches to the bottom of the window. I have to C-l a few times to get it back on top. Once again after I execute anything it goes back to the bottom of ...
1
vote
1answer
83 views

How to create another instance of (e)shell in a DWIM fashion?

I have seen several proposals to run more than one instance of eshell (or shell) at a time. See here and here. However, they are inconvenient in my view, using peculiar key chords and forcing you to ...
1
vote
0answers
40 views

how can I view the history on remote hosts with helm-eshell-history?

I'd really like to use eshell on remote hosts, however I have to use !N in order to call history items. I haven't found any other way to select history items and this is really inconvenient compared ...
16
votes
2answers
2k views

How can I setup eshell to use ivy for tab completion?

I'm very fond of ivy for completion and love that a simple (ivy-mode 1) is enough to get ivy almost everywhere that Emacs uses some sort of completion (that is acomplished by overriding completeing-...
2
votes
1answer
122 views

Can't parse the output of manpages in pcmpl-args.el in Emacs 25.1.1

This is a followup to this question, as I originally was uncertain as to how to make this question into a suitable format for this site. So, I'm a user of pcmpl-args.el, which is an Emacs package that ...
3
votes
1answer
919 views

Eshell will enter “Text is read only” and freeze

Basically I try to enable showing git branch I'm in in eshell buffer. The elisp I got works fine. But I will constantly run into "Text is read only " and have to kill the eshell buffer to start over. ...
1
vote
2answers
68 views

Eshell cannot insert *

If I fire up an eshell an try to type the following: ls * The * char is automatically deleted. By calling C-h k on * I get the expected: * runs the command self-insert-command Does anyone know ...
40
votes
3answers
8k views

Weird shell output when using IPython 5

I just upgraded to the latest version of IPython and now something is wrong when using it in emacs. When using it in a regular terminal it works fine (colors, tab-completion, etc.), however either ...
1
vote
4answers
1k views

From eshell or ansi-term can I open a file in the same window without a new instance of Emacs?

I'm wondering if anyone knows of a clever way in Emacs when in a shell, can I directly open a file without having to open it in another Emacs instance.
3
votes
1answer
269 views

emacsclient directly start eshell command command line

Both of the following work to call a graphical/terminal eshell: emacs -f eshell emacs -nw -f eshell Furthermore, this 2-step process also works: `emacsclient -t -a '' /some/real/file/name Metax ...
4
votes
0answers
579 views

FZF broken displaying in emacs terminal

I'm struggling to run fzf in emacs but cannot figure out whats my problem. When I run fzf - and start typing - text gets mess up, similar to this: I tried run fzf in term, eshell, ansi-term, multi-...
2
votes
1answer
86 views

Removing eshell automatic correction

This question is surprisingly difficult for me to formulate in a google-able way, but how can I stop eshell from correcting away my asterisks? For example, if I try $ rm ./*~ to remove auto-saved ...
1
vote
1answer
61 views

Running ruby files from $PATH in Eshell

I'm trying to find a way to run .rb files that are in the $PATH in Eshell by following the solution here. I added ".rb" to exec-suffixes, set eshell-force-execution to t and customized eshell-...
0
votes
1answer
621 views

why tmux under ansi-term so slow?

I use colorized output in ghci. And if run it: in comint-mode, or in eshell, then colors displayed fine, but a lot of escape sequences displayed like ^A^Bλ ^A^B> ^A^B^B. in ansi-term, then I got ...
0
votes
2answers
201 views

Windows eshell alias command line arguments.. how?

I have alias msexcel (w32-browser "C:/program files/microsoft office/office12/excel.exe") and this means I can do msexcel from eshell and an asynchronous MS Excel will begin to run. I am looking for ...
2
votes
1answer
207 views

getting a process buffer for an eshell buffer

To get a process buffer an eshell buffer I thought I used to be able to run: (get-buffer-process (current-buffer)) In Emacs 25 this no longer works. Specifically "GNU Emacs 25.1.50.2 (x86_64-...
2
votes
2answers
123 views

How to copy multiple specified files in eshell

The following works in a separate program terminal window (to copy multiple specified files in the same directory), but the command does not work in Eshell (No such file or directory). Is there an ...
2
votes
1answer
390 views

Where is the find alias in eshell?

I'm a newbie to eshell and I want to find the list function(s) which "find ./" calls. For the ls command I can use which ls which conveniently tells me where eshell/ls is, and links to the ...
4
votes
1answer
313 views

How can I use 'emacsclient' as $PAGER in eshell with pipe? or any better PAGER which works well with eshell?

When I typed git diff in eshell, it has weird attribute such like print : in every single line, cannot scroll back, and so on. I think this is because the default eshell env PAGER is set as less, and ...
3
votes
1answer
49 views

Why is the 'type'-command not accepted in Eshell?

As I understood from the documentation of Eshell, every time that a command will be executed, it will be executed internally in Eshell/Emacs. When it gives an error code, then the command will be ...
4
votes
1answer
98 views

remote tramp eshell session changes to localhost

I start a tramp dired session to a remote host with C-x d /ssh:user@host:/ and then start eshell with M-x eshell. This places me at the dired path on the remote host, however as soon as I try to cd ...
0
votes
1answer
422 views

Possible to use grep in eshell without opening a *grep* buffer?

When i use grep in eshell, like 'cat test.txt | grep test', grep opens it's own buffer with the result. Is it possible to capture the output of grep in the eshell buffer?
1
vote
1answer
1k views

Windows 10 + Emacs shell--can't run processes from eshell; unwanted cmd windows open

I've been upgraded at work to a Windows 10 machine, from Windows 7. Apparently, this has caused problems. First, eshell doesn't seem to be able to launch windows processes anymore. I get "Spawning ...
2
votes
1answer
301 views

Starting emacs with eshell and file from command line argument

I am trying to start emacs with both eshell and the specified file, but displaying the buffer with the file. When I add the following line to emacs (add-hook 'emacs-startup-hook (lambda () (eshell)))...
0
votes
1answer
69 views

automatically run command when establishing ssh connection

I often work on remote hosts and I mostly need to be root, but I can't login as root. It would be convenient, if sudo -s is being executed automatically when I establish a connection with shell/eshell....
3
votes
1answer
503 views

Can Emacs Eshell show remote man pages in TRAMP mode?

When I'm logged in to a remote machine in eshell I can still do man ls. But it appears that this only work for my local man pages. If I try man yum I'll get a message that the yum man page is not ...
1
vote
1answer
76 views

eshell backtrace when trying to use character command

I have written a custom interactive command that takes a character as an argument. When I happen to use the key binding for that command while in a eshell buffer where a long-running command is ...