Macos 如何在bash中将空字符串传递给EmacClient的别名?

Macos 如何在bash中将空字符串传递给EmacClient的别名?,macos,bash,emacs,emacsclient,Macos,Bash,Emacs,Emacsclient,我想向EmacClient传递一个空字符串,以便它在emacs服务器尚未运行时自动启动。如果我在命令行中键入emacsclient-t-a',这正是我刚才描述的。在我的bashrc文件中,我有: alias ec="emacsclient -t -a \'\'" 这不是我想要的。我得到这个错误 emacsclient: can't find socket; have you started the server? To start the server in Emacs, type "M-x

我想向EmacClient传递一个空字符串,以便它在emacs服务器尚未运行时自动启动。如果我在命令行中键入
emacsclient-t-a'
,这正是我刚才描述的。在我的bashrc文件中,我有:

alias ec="emacsclient -t -a \'\'"
这不是我想要的。我得到这个错误

emacsclient: can't find socket; have you started the server?
To start the server in Emacs, type "M-x server-start".
emacsclient: error executing alternate editor "''"

如何将空字符串作为参数传递?

不需要在双引号中转义单引号:

alias ec="emacsclient -t -a ''"