Questions tagged [eshell]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
281 views

run a binary that uses ncurses in eshell under xterm-256color emulation

I have a binary (a rust program that uses bindings to ncurses) and I need to run it in eshell as xterm-256color (well, make it work correctly at least). I haven't figured out how to do this yet. Tried ...
7
votes
2answers
581 views

Why does xdg-open not work in eshell?

I want to open a.html in a browser from emacs (v. 24.5.1, using -Q [updated after comment]). M-x shell-command xdg-open a.html works as expected, but M-x eshell $ xdg-open a.html does not seem to ...
2
votes
1answer
236 views

How do I protect command output in eshell and REPL buffers?

Since command outputs are easily mutable, I have to be careful when I work with eshell and REPL buffers. Is there a way to protect them?
5
votes
1answer
224 views

Why does eshell corrupt my files when using redirection?

If I run this in bash (it's a GraphViz command to make a picture of a graph based on the input file testgraph): $ dot -Tpng testgraph.dot > graph.png with this testgraph.dot: digraph G { a -&...
8
votes
1answer
162 views

Why does eshell prefer lisp functions even when eshell-prefer-lisp-functions is nil?

If I startup emacs 24.5.2 with emacs -Q and do M-x eshell, then run: $ which rm eshell/rm is a compiled Lisp function in `em-unix.el' I get the eshell version. But if I C-h v eshell-prefer-lisp-...
4
votes
0answers
38 views

How do I prevent sed from endlessly reading stdin when run in eshell?

If you execute the following in bash: $ echo hello | sed 's/hello/world/g' world sed quits immediately, as desired. If you do the same in eshell, sed will still print 'world' but it will keep ...
2
votes
1answer
529 views

How to make an alias in eshell

I want to make an alias in eshell so that when I type gcc it actually does gcc -Wall -pedantic -std=c99 but when I make the alias, it just displays gcc -Wall -pedantic -std=c99 and doesn't actually ...
3
votes
1answer
79 views

Why can't eshell/echo print dashes?

For some reason it appears eshell/echo can't handle dashes: $ echo "aaaaaaaaaaaaa" aaaaaaaaaaaaa $ echo "=============" ============= $ echo "-------------" $ Is this expected behavior? I assume it'...
2
votes
0answers
154 views

Eshell stuck colors

When using eshell, if I run a command that outputs colored text, sometimes eshell will get 'stuck' in that color. For example if I use ack and press Ctrl+C before the output finishes this will happen. ...
9
votes
1answer
374 views

Merge history from multiple eshells

Before switching to eshell I had zsh setup so that it would: Write out to the history file after every command Append to rather than overwrite the history file so when running multiple shells they ...
4
votes
1answer
594 views

Stripping stray ANSI escape sequences from eshell

I can't seem to identify this color sequence. I have enabled ansi colors successfully (to test, ls shows colored output), however a strange thing happens when I attempt to run npm and I can't identify ...
7
votes
1answer
487 views

eshell-visual-commands with tramp

I know that I can add commands to eshell-visual-commands to for example make it so when I run "top" it runs in a temporary ansi-term buffer instead of the eshell buffer, so that programs that rely on ...
9
votes
1answer
154 views

How to create back/forward directory aliases for eshell?

For years I've been using a zsh script that causes a pushd to implicitly happen everytime you change directories. The script also sets up 'b' and 'f' aliases, short for backwards and forwards, that ...
1
vote
2answers
189 views

How to write a custom find-file function

I want to write a set of functions that call specific files, not by a specific name, but the newest file (with a certain suffix) in the directory. So far I've got (defun org_lisp_dir () (...
7
votes
3answers
3k views

How to make terminal/shell spawned inside Emacs running on a Mac inherit the environment variables of the native terminal?

The terminal natively on Mac i.e. spawned through Spotlight or Launchpad, adopts the desired environment variables including the customization in ~/.bash_profile. But when I run Emacs (Emacs.app taken ...
0
votes
0answers
206 views

Incorrect Line Spacing in (term-mode, ansi-term, eshell, shell) Output

The output of certain commands in multiple major modes (term-mode, ansi-term, shell, eshell) is incorrectly spaced (see images). This occurs for numerous commands and does not occur in other emulators ...
8
votes
3answers
372 views

How to open files in eshell with wildcards

I am very used to typing in a shell something like: emacsclient **/Threshold.java Where Threshold.java is a file deeply nested in a directory and I just want to open it by name. When I try the same ...
0
votes
1answer
406 views

eshell alias not working properly

the following alias in the aliases file doesn't work in eshell 2.4.2, emacs 24.4.1 alias ff 'find-file $1' error message as is is given below find-file $1: command not found Any ideas what ...
1
vote
1answer
192 views

Eshell: run function when changing directory

I'd like to run a function whenever the current directory in eshell changes (like a eshell-chdir-hook, but that doesn't exist). How can I do this?
2
votes
2answers
226 views

Access to the elisp “commands” behind eshell commands?

As I've read, eshell commands are just wrappers around actual elisp expressions. If true, everything I do in eshell I could do in an elisp REPL, right? Is it therefore possible to see what actual ...
2
votes
1answer
50 views

Equivalent of `shopt -s autocd` in eshell

I use shopt -s autocd in the bash shell. It allows me to just type in the directory name and cd there. Is there some equivalent in eshell?
0
votes
2answers
639 views

In shell, eshell and comint-modes, the cursor moves back one chacacter when I switch buffers

When I'm in a shell and I change buffers, if I switch back to the shell buffer, the cursor has moved back a character and I can't start typing new shell commands until I hit -> first. This happens ...
3
votes
1answer
128 views

How do I change behaviour of eshell/rm (rm in eshell) tab completion?

Qestion: Is there a way to make eshell/rm (especially) either display a completion buffer even for few files or remove the . and .. entries for eshell/rm. Background (and some ranting): So I learned ...
7
votes
1answer
724 views

Is there a way to view the man pages in color in emacs?

I am trying to read the man pages in color. So far I have been using eshell and just typing man <program> However this does not use color to highlight the options etc. I have read that M-x ...
8
votes
2answers
786 views

Eshell: Go to prompt line on key press

Sometimes, when I scroll up in eshell, point leaves the command prompt line to stay in the visible area. When I then enter a command, I don't enter the command at the prompt, but rater insert the text ...
5
votes
1answer
2k views

Why Emacs overrides my PATH when it runs bash?

Why do (shell-command-to-string "echo $PATH") and echo $PATH in eshell differ from echo $PATH from ansi-term and gnome terminal in Ubuntu? Some paths are missing from (shell-command-to-string "echo $...
0
votes
3answers
208 views

Can I get the auto complete window when ssh'd into a server running emacs?

If I have a virtual machine, and I ssh into that machine, then start emacs: (so at this point I am looking at my terminal emulator, which is showing the command line version of emacs on the other ...
3
votes
1answer
413 views

Disable company in eshell when using TRAMP

company-mode is awesome. It even works in Eshell. However, when I'm cdd into another host, company mode makes Eshell unusable because it's always hanigng waiting for TRAMP. Is there any way I can ...
4
votes
1answer
355 views

Having trouble getting eshell remote shell multi-hop to work

I can get single hop ssh to work just fine: ~ $ cd /ssh:cpatti@wak-prod-jump1:~ /ssh:cpatti@wak-prod-jump1:/home/jumpboxaccess_emergency $ But when I try multi-hop, I get command not found every ...
2
votes
1answer
62 views

Eshell-print only works when called from eshell

The function eshell-print has some weird behavior, as it only seems to work when called as a part of an eshell process. All other times it throws the error wrong type arguments: arrayp, nil Try ...
3
votes
1answer
388 views

How does comint-mode override beginning of line behavior? I want same functionality to eshell

My Emacs version is 24.5.1. Comint-mode protects the prompt by somehow defining the beginning of line to start directly after the prompt regex. This works for normal motion commands like move-...
5
votes
2answers
4k views

How to open `shell` or `eshell` in a new window or frame

By M-x eshell or M-x shell Emacs opens a shell or an eshell in the current window. How to open this shell or eshell in a new window?
5
votes
5answers
4k views

How to clear the eshell

After looking at this answer I find it hard to believe there is no way to clear the eShell. Does anybody know of a short function or method to delete the entire buffer. Pressing C-l just scrolls the ...
1
vote
1answer
346 views

Why don't rails commands run in eshell?

I am a total emacs newbie and am trying to figure my way around emacs(I am kinda liking it). Now my question is that when I type rails commands in my terminal, they work perfectly well. user ~ $ ...
8
votes
1answer
330 views

How to improve the performance of eshell buffer truncation?

I currently truncate buffers at 20,000 lines by adding the following to my configuration: (setq eshell-buffer-maximum-lines 20000) ;; automatically truncate buffer after output (add-to-list 'eshell-...
2
votes
1answer
112 views

How can I tell if a buffer is a comint buffer, eshell buffer or neither?

I have Emacs Lisp program that I want to work inside either a comint process buffer or an eshell buffer. The code I currently am using is: https://github.com/rocky/emacs-dbgr/blob/master/realgud/...
6
votes
1answer
3k views

What does TERM=dumb in eshell mean?

In eshell, if I echo $TERM, the result is dumb. What does this mean? Is this an emacs specific thing, or a tty thing?
10
votes
1answer
2k views

Colored git output in eshell

I'm using emacs inside a mintty (configured to say it's xterm-256color) terminal on cygwin. list-colors-display works fine. and colors are displayed in dired listings etc. Now I set the color for git ...
5
votes
1answer
248 views

Is there something like brace expansion in eshell?

Is there something like brace expansion in bash or zsh for eshell? For those unfamiliar with brace expansion: it is a part of shell expansion in some shells, such as bash or zsh that works as follows:...
2
votes
1answer
135 views

How can I save eshell alias settings when using prelude?

Second day using Emacs. I've forked the Prelude GitHub project and I'm storing my settings in the personal folder as instructed in the documentation. I would like to be able to use my eshell ...
4
votes
2answers
586 views

What is the syntax for a subshell in eshell?

How to write the analogue of a bash-command like: (cd ../repo && git fast-export master) | darcs convert import repo_master in eshell? Here a subshell is employed to restrict the effect of ...
9
votes
1answer
2k views

How do I make tramp+eshell use my environment customized in the remote ~/.bash_profile

I have set up custom $PATH in my ~/.bash_profile on a remote machine (for programs installed user-locally by nix and cabal). I use eshell and tramp to issue commands on the remote machine (cd /...
8
votes
3answers
3k views

How to programmatically execute a command in eshell?

I want to execute simple commands in eshell without explicitly typing them into the prompt, using something like with-current-buffer How can I do this?
1
vote
1answer
295 views

Eshell prompt regex

I'm trying to get my two-lined eshell prompt working with eshell. It gets displayed alright, and it's also non-readable. But when I call something external, the cursor doesn't jump "down" to the new ...
0
votes
0answers
135 views

Use 'open' command on OS X from eshell

Inside of eshell I get the error LSOpenURLsWithRole() failed with error - 10810 for the file ... if I try to use the open command on OS X. What's going on here and is there a workaround? Edit: The ...
0
votes
1answer
188 views

tree command in eshell on Windows

The unix tree command gives a very good overview of the project/dir structure. Even Windows has its own version of tree. When I run tree command in eshll on Windows, I got this error: $ tree ...
1
vote
1answer
132 views

How to use Emacs to open an eshell from Terminal at a specific path

By default, if I invoke emacs from terminal by typing $ emacs C:\users a directory-like environment opens. Then if I do M-x eshell, an eshell environment opens at this path. My question is how to ...
2
votes
1answer
322 views

call-process and Hunspell (in Emacs 24.4)

I am having problems running ezwinports Hunspell 1.3.2-3 in Emacs 24.4.1 for Windows. When calling ispell-buffer with debug, I see the following functions are called. ispell-buffer -> ispell-...
2
votes
1answer
315 views

What's eshell's syntax for command substitution?

for pid in $(ps -ef | grep "chrome" | awk '{print $2}'); do kill -9 $pid; done Invalid read syntax: ")" What's the right way to run this script in Eshell?
1
vote
1answer
60 views

Alias doesn't work for aptitude search in Eshell

alias works very well in Eshell. I've used it like this: alias sau sudo aptitude update However, it doesn't work for the search command: $ alias aps aptitude search $ aps emacs search: You must ...