比如,在命令行中 rm -rf *
会提示:
sure you want to delete all the files in /Users/isaac/tmp/demo [yn]:
需要回答 yes-or-no
Emacs 如何捕获这类交互式的命令。 在 minibuffer 中交互最好。
开一个 eshell
这类方案最好不要说了
比如,在命令行中 rm -rf *
会提示:
sure you want to delete all the files in /Users/isaac/tmp/demo [yn]:
需要回答 yes-or-no
Emacs 如何捕获这类交互式的命令。 在 minibuffer 中交互最好。
开一个 eshell
这类方案最好不要说了
那只是 ZSH 交互模式下特有功能:
/tmp $ rm -rf *
zsh: sure you want to delete all the files in /tmp [yn]?
Emacs MiniBuffer 总不至于能模拟终端,感觉你的需求应该没办法实现。
不能捕获标准输入输出吗?
M-x shell 或 M-x term
我是想通过执行一个 shell 脚本, 然后根据执行结果进行下一步操作, 这个 shell 脚本存在这种
yes-or-no
和 输入密码
这种交互
那么在终端(shell
或 term
)中里运行它,我不明白到底有什么问题。