When in eshell is there a command for opening a file in another buffer?
How to open file in Emacs via eshell?
13.9k Views Asked by hks At
5
There are 5 best solutions below
0
On
In eshell, you don't have to use the entire path when using the find file command. Hitting C-x C-f is the same as typing find-file, and eshell sets the directory to the one you are currently browsing. This is the advantage to me over using ansi-term. Try it out.
1
On
find-file basically does it, as ataylor and ryan kung indicated earlier.
$ find-file myfile
but, using eshell itself, you can also can set an even shorter alias:
$ alias ff 'for i in ${eshell-flatten-list $*} {find-file $i}'
(and eshell remembers it permanently). so from now you can just type:
$ ff myfile
thanks to this tutorial
You can call elisp functions directly. So to open a file, call
find-fileon the filename. Example:Parentheses and quotes are optional, so this works too: