无法在.screenrc中获取

Léo*_* 준영 2 sh screenrc

我的.screenrc中有以下内容

 source ~/bin/Screen/multiUserSettings                                                                                                                                                                 
Run Code Online (Sandbox Code Playgroud)

它给了我

No such file or directory
Run Code Online (Sandbox Code Playgroud)

虽然我有它.

下面的代码告诉我那个未知的命令".".

. ~/bin/Screen/multiUserSettings                                                                          
Run Code Online (Sandbox Code Playgroud)

这很奇怪,因为我可以采购.例如,在.vimrc和.zshrc中.

文件multiUserSettings

 # allow the following people full control
 addacl root,aledesma,mymanager,mycoworker1,mycoworker2
 aclchg aledesma +rwx ?#??

 # allow everyone readonly access
 aclchg *,!aledesma -rwx ?#??

 # setup 10,000 lines of available scrollback ? copy/paste
 defscrollback 10000

 # fix scrollback in putty
 termcapinfo xterm* ti@:te@
Run Code Online (Sandbox Code Playgroud)

你怎么能在.screenrc中找到?

ico*_*ast 10

使用绝对路径不能跨机器移植(例如,如果您使用git或svn在您登录的服务器之间同步.rc文件).更好的是使用$ HOME变量,它在.screenrc文件中工作.例如:

source $HOME/bin/Screen/multiUserSettings
Run Code Online (Sandbox Code Playgroud)

这样,如果您使用.screenrc的一台机器的主目录为/ home/yourname,另一台机器具有/ Users/yourname,另一台机器具有/ opt/export/yourname,那么它们仍然可以工作.