[英]How do I pass an empty string to my alias for emacsclient in bash?
我想將一個空字符串傳遞給emacsclient,以便如果尚未運行emacs服務器,它將自動啟動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 ''"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.