Questions tagged [eshell]

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

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

It invokes no external processes except for those requested by the user. It is intended to be a functional replacement for command shells such as bash, zsh, rc, or 4dos since Emacs itself is capable of handling the sort of tasks accomplished by those tools.

Everything it does, it uses Emacs's facilities to do. This means that Eshell is as portable as Emacs itself. It also means that cooperation with Lisp code is natural and seamless.

223 questions
41
votes
4 answers

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 in M-x eshell or M-x shell, instead of outputing In…
Literal
  • 675
  • 5
  • 10
28
votes
1 answer

What are all the ways of launching a shell from inside emacs and what are their various properties?

I know of at least four possibilities: eshell term ansi-term shell What's the complete list of tools built-in to emacs to launch a shell, and what benefits and drawbacks do they offer?
Trevoke
  • 2,375
  • 21
  • 34
20
votes
2 answers

How to let eshell remember sudo password for two minutes?

In a general term runing bash, when I run a sudo ... command, bash will remember my password for a while. This makes package management task easier. For example: sudo apt-get update # password ...... sudo apt-get install turing-brain # execute…
Nick
  • 4,423
  • 4
  • 24
  • 41
16
votes
2 answers

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-read, I believe). But this doesn't setup eshell to…
Omar
  • 4,732
  • 1
  • 17
  • 32
15
votes
1 answer

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 would all get merged into one big history Both zsh…
Joseph Garvin
  • 2,061
  • 8
  • 21
12
votes
1 answer

Run application in cwd on remote host from within eshell

I often use Eshell to connect to remote systems. On those remote systems I sometimes want to run scripts in the current working directory. In a regular terminal I'd type this: ./my-script.sh Unfortunately, inside of Eshell this won't work: ~ $ cd…
user2005
12
votes
7 answers

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 text, as soon as enter is pressed all of that text…
Startec
  • 1,354
  • 1
  • 13
  • 30
11
votes
1 answer

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 /remotehost:somedir; then commands). (I chose this method…
11
votes
6 answers

How to run a previous command in an Emacs shell?

Of course when I am in Terminal and I press the up arrow key, it goes to the previous command. However, when I hit the M-x keys and type shell an integrated shell comes up in Emacs: However, if I type a command and press up, this happens: How do…
programking
  • 7,064
  • 9
  • 41
  • 62
11
votes
1 answer

Attach to running remote shell with eshell/TRAMP/dtach

I often use GNU Screen to keep remote sessions alive. Since I live in Emacs, I'd really like to be able to resume a running remote shell session from within Emacs. GNU Screen implements all sorts of fancy things like terminal multiplexing and…
user2005
10
votes
1 answer

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 branch current branch to be yellow reverse.…
user6590
10
votes
4 answers

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?
caisah
  • 4,056
  • 1
  • 23
  • 43
9
votes
2 answers

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 do anything. There is no error message. This…
9
votes
1 answer

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-functions I see the value is nil. Yet the…
Joseph Garvin
  • 2,061
  • 8
  • 21
9
votes
1 answer

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 move you up and down the stack, similar to the back…
Joseph Garvin
  • 2,061
  • 8
  • 21
1
2 3
14 15