Skip to main content
20 votes

How to clear the eshell

Running clear with 1, as in clear 1 works. How could you have found this out? We know we want to look for a function about eshell and it has to do with clear. So, why not do C-h f and type eshell ...
scribe's user avatar
  • 1,090
15 votes

fix or workaround: "Terminal is not fully functional"

Quick answer That's not an issue, it's a statement of fact. M-x shell isn't a fully functional terminal - it simply can't do what you want it to do. If you want a full terminal emulator in emacs, you ...
Tyler's user avatar
  • 22.8k
14 votes

Emacs can't find Node when Node was installed using NVM

Best solution: Install exec-path-from-shell. From the documentation, after calling (package-initialize), add the following to your .emacs file: (when (memq window-system '(mac ns x)) (exec-path-...
user2245766's user avatar
12 votes
Accepted

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

This should work fine: (define-key eshell-mode-map (kbd "<tab>") 'completion-at-point) I don't know why the above isn't the default. But I use only shell-mode and term-mode anyway.
abo-abo's user avatar
  • 14.3k
10 votes

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

Add the follows to your init file and use M-x man or the man command in eshell to view man pages: (the colors fits the wombat theme; you can change them for yourself) (require 'man) (set-face-...
xuhdev's user avatar
  • 1,961
7 votes

How to let eshell remember sudo password for two minutes?

To get sudo working in Emacs 26 (probably the same for Emacs 25) without making an alias I had to add eshell-tramp to eshell-modules-list. (add-to-list 'eshell-modules-list 'eshell-tramp)
Emiluren's user avatar
6 votes
Accepted

No colors for eshell?

Eshell is an independent command interpreter implemented in Elisp, so by default it should have nothing to do with your other dotfiles, such as ~/.bashrc. The custom prompt function you list works ...
Basil's user avatar
  • 12.6k
6 votes

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

I found something that seems to work OK upon initial testing: essentially rebind <tab> to pcomplete-std-complete, but since that function isn't interactive for some reason, you need to wrap it: ...
Omar's user avatar
  • 4,852
6 votes

fix or workaround: "Terminal is not fully functional"

If you don't care about whether Emacs is a "fully-functional" terminal or not and you just want it to work without making you press enter, then run the psql command \pset pager off. This ...
db48x's user avatar
  • 19.1k
6 votes
Accepted

eshell should use bash_aliases

eshell should not use your bash aliases because, other than them both being shells, eshell has nothing to do with bash. eshell is a shell written entirely in elisp. It's not bash, sh, ksh, csh, zsh, ...
phils's user avatar
  • 53k
5 votes

How to clear the eshell

This does it to one, insted of two lines. ;Clear the eshell buffer. (defun eshell/clear () (let ((eshell-buffer-maximum-lines 0)) (eshell-truncate-buffer))) Typing clear in eshell will then ...
K.D.G's user avatar
  • 51
5 votes
Accepted

How to mix eshell and elisp code

For something simple, shell-command-to-string may suffice. For something more complicated where the output needs to be modified, searched, etc., then something more elaborate may needed e.g., set-...
lawlist's user avatar
  • 19.5k
5 votes
Accepted

Setting E-Shell Alias

At first a comment on your alias. While the emacswiki-page suggests that alias mv 'mv -v $*' is right the corresponding official manual page says that you should use alias mv mv -v instead. In the ...
Tobias's user avatar
  • 33.7k
5 votes

Customize eshell redirection to buffer

To redirect to a buffer, use #<buffer buffer-name>, since Emacs 24.4, you can also use the shorthand #<buffer-name>. For example, echo hello >>> #<buffer *scratch*> echo ...
xuchunyang's user avatar
  • 14.8k
5 votes
Accepted

eshell print time and exit status for every command

Here is my attempt (defvar-local eshell-current-command-start-time nil) (defun eshell-current-command-start () (setq eshell-current-command-start-time (current-time))) (defun eshell-current-...
xuchunyang's user avatar
  • 14.8k
5 votes
Accepted

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

I don't think anything is broken, it seems that Emacs isn't designed to deal with the -l grep flag the way you're trying to use it. Without the -l flag, Emacs (via eshell or M-x grep) will take the ...
Tyler's user avatar
  • 22.8k
5 votes
Accepted

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

Yes: ls >(get-buffer "*scratch*") Or even ls > #<buffer *scratch*> See this question for more details.
Fran Burstall's user avatar
5 votes
Accepted

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

I then tried various sorts of C-h and websearch, without success. Please check the manual first! (or second, after docstrings) (eshell) Dollars Expansion: Eshell has different ‘$’ expansion syntax ...
npostavs's user avatar
  • 9,253
5 votes

How to launch term at startup in Emacs?

Start with Eshell: (setq initial-buffer-choice #'eshell) Start with running Bash in Term: (setq initial-buffer-choice (lambda () (term "bash"))) C-h v initial-buffer-choice If the value is a ...
xuchunyang's user avatar
  • 14.8k
4 votes
Accepted

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

There is no hook specifically for switching buffers, but you can use the buffer-list-update-hook. Switching buffers re-orders the buffer list and triggers this hook, so you could use that to run a ...
glucas's user avatar
  • 20.9k
4 votes

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

The one word you request can also be just a dot .. After running that command you get: ~/Documents $ . hello.el Hello World ~/Documents $ If this is too strange for you you can also use: ~/...
Tobias's user avatar
  • 33.7k
4 votes

How to force new `shell` to appear in current window?

Here's what I have for this. It opens a shell in the current window. (add-to-list 'display-buffer-alist '("^\\*shell\\*$" . (display-buffer-same-window)))
Chris McMahan's user avatar
4 votes
Accepted

How to keep grep results in eshell buffer

eshell has several built-in commands (grep among them) and it prefers to use the built-in version: ~ $ which grep eshell/grep is a compiled Lisp function in ‘em-unix.el’. As the manual that I linked ...
NickD's user avatar
  • 33.6k
4 votes
Accepted

Why does `eshell` not create an active process In Emacs while `shell` and `term` do?

As mentioned in the manual page on Processes, the term process refers to an OS process. Emacs runs in a process, but can invoke other external processes and manage them as subprocesses. When you run M-...
Trevor's user avatar
  • 56
4 votes
Accepted

How to make buffer recognize file moved?

I could be wrong - if so, someone will correct me. But I think this is the case: How can you expect Emacs to know where the file it read was moved to, if you move it outside Emacs? Same thing for if ...
Drew's user avatar
  • 79.1k
3 votes
Accepted

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

You can disable the Eshell's scroll feature using: (add-hook 'eshell-mode-hook (defun chunyang-eshell-mode-setup () (remove-hook 'eshell-output-filter-functions ...
xuchunyang's user avatar
  • 14.8k
3 votes

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

You might check whether eshell-scroll-to-bottom-on-output is set to nil. Here's the documentation: Documentation: Controls whether interpreter output causes window to scroll. If nil, then do ...
mclear's user avatar
  • 1,605
3 votes

Define custom keys only for eshell

(add-hook 'eshell-mode-hook (lambda () (define-key eshell-mode-map (kbd "<f9>") #'emacs-version)))
xuchunyang's user avatar
  • 14.8k
3 votes

How to clear the eshell

While there is a built-in eshell/clear in recent versions of Emacs, it does something rather unfortunate: when there is unsent input at the current prompt, clearing the buffer sends the input. This ...
Tianxiang Xiong's user avatar
3 votes

How to clear the eshell

I use make eshell buffers and I rename them accordingly. So a slight modification to @scribe's answer works perfectly on eshell buffers with anyname. (defun run-this-in-eshell (cmd) "Runs the ...
soumya ranjan Tripathy's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible