How to open file in Emacs via eshell?

hks picture hks · Feb 4, 2011 · Viewed 11.3k times · Source

When in eshell is there a command for opening a file in another buffer?

Answer

ataylor picture ataylor · Feb 4, 2011

You can call elisp functions directly. So to open a file, call find-file on the filename. Example:

~ $ ls
myfile
~ $ (find-file "myfile")

Parentheses and quotes are optional, so this works too:

~ $ find-file myfile