我的 /path/to/startupscripts 目录中有以下脚本,因此我可以使用命令“emacs”打开 emacs GUI:
#!/bin/sh
/Applications/Emacs.app/Contents/MacOS/Emacs "$@"
我编辑了我的 ~/.bash_profile 并添加了以下行
export PATH=/path/to/startupscripts/emacs:$PATH
但是,脚本不起作用,因为当我在命令行中输入“emacs”时,emacs 仍然在终端中打开,而不是我想要的 GUI。此外,当我在 /path/to/startupscripts 目录中时,我可以执行和运行脚本
chmod +x emacs
./emacs
但即使我之后输入“emacs”,它仍然会在终端中打开。我有点初学者,我想我错过了一些非常明显的东西。