在Emacs中为命令foo运行M-x man foo是很好的。这样就可以在手册页中轻松导航,并快速找到详细信息。
当命令(如git)的帮助产生有限的输出时,可以直接使用终端而不是emacs。
但有时,一条命令(例如终端中的aws help-run)会产生大量输出。然而,输出与emacs Man模式不兼容。一种选择是在emacs中使用M-x shell,但这不会立即显示页面。它将报告"WARNING: terminal is not fully“,并且需要不断地按某个键,直到出现完整的帮助,或者,对于Emacs 25,”找不到名为‘groff’的可执行文件“。
阅读由emacs中的命令生
假设我们有一个bash,它的输出是命令(在终端中显示),输出到一个日志文件,如下所示:
#!/bin/bash
exec 3>&1
exec 1> logfile.log # logfile.log contains all what will be printed in terminal and it will keep updating its content till the script finish it is job
command#1
command#2
command#3
.
.
.
.
.
echo -n "Process is DONE ...
我在Mac上的.bash_profile中添加了一些东西,但它们给出了一个错误。以下是我现在启动终端时的整个文本日志:
Last login: Thu Oct 25 23:10:03 on ttys000
dirname: illegal option -- b
usage: dirname path
-bash: /bin/naoqi-bin: No such file or directory
-bash: exec: /bin/naoqi-bin: cannot execute: No such file or directory
[Process completed]
问题是,由于“