无法直接从终端在 Emacs 中打开手册
我想直接在终端中打开 Emacs 手册,但
man man
我将以下代码作为别名放入 .zshrc 中,但未成功
alias man=x
unalias man
man() { emacs ^x man }
如何打开 emacs 手册?
I want to open manuals directly in Terminal to Emacs by
man man
I put the following code as an alias in .zshrc unsuccessfully
alias man=x
unalias man
man() { emacs ^x man }
How can you open manuals to emacs?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
也许这就是您的意思:
setq
只是为了使手册页隐藏*scratch*
缓冲区; 如果你不想这样,那么就足够了。如果你想从命令行调用Emacs函数,你必须在elisp中编写函数调用; 你不能只在命令行上给出 Emacs 按键序列。
Perhaps this is what you mean:
The
setq
is there just to make the manual page hide the*scratch*
buffer; if you don't want that, it is enough to doIf you want to call Emacs functions from the command line, you must write the function call in elisp; you can't just give Emacs key sequences on the command line.
我不确定我完全理解你的问题,但你可以通过简单地执行
Mx man
后跟你想要查看的手册页来在 emacs 中打开一个手册页。 如果您想直接从命令行执行此操作,我想设置一个脚本来执行此操作不会太困难。I'm not sure I completely understand your question, but you can open a man page in emacs by simply doing
M-x man
followed by the man page you want to view. If you want to do this directly from the command line I imagine it would not be too difficult to set up a script to do this.查看信息页面的这部分(以及以下部分)了解更多信息。
Check out this part of the info pages (and the following sections) for more information.
有几种可能性,具体取决于您希望手册页的格式如何:
或
或
A few possibilities, depending on how you want the man pages formatted:
or
or