ata*_*lor 48
您可以直接调用elisp函数.所以要打开文件,请调用find-file文件名.例:
~ $ ls
myfile
~ $ (find-file "myfile")
Run Code Online (Sandbox Code Playgroud)
括号和引号是可选的,所以这也适用:
~ $ find-file myfile
Run Code Online (Sandbox Code Playgroud)
小智 13
在eshell中,使用find file命令时不必使用整个路径.点击Cx Cf与输入find-file相同,eshell将目录设置为您当前正在浏览的目录.这对我来说比使用ansi-term更有优势.试试看.
find-file basically does it, as ataylor and ryan kung indicated earlier.
$ find-file myfile
Run Code Online (Sandbox Code Playgroud)
but, using eshell itself, you can also can set an even shorter alias:
$ alias ff 'for i in ${eshell-flatten-list $*} {find-file $i}'
Run Code Online (Sandbox Code Playgroud)
(and eshell remembers it permanently). so from now you can just type:
$ ff myfile
Run Code Online (Sandbox Code Playgroud)
thanks to this tutorial