无法在 .screenrc 中获取源代码
我的 .screenrc 中有以下内容,
source ~/bin/Screen/multiUserSettings
它给了我
No such file or directory
尽管我有它,但
。 下面的代码告诉我未知命令“.”。
. ~/bin/Screen/multiUserSettings
这很奇怪,因为我可以通过 . 例如,在 .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@
如何在.screenrc 中获取源?
I have the following in my .screenrc
source ~/bin/Screen/multiUserSettings
It gives me
No such file or directory
although I have it.
The following code says me that unknown command ".".
. ~/bin/Screen/multiUserSettings
It is strange, since I can source by . in .vimrc and .zshrc, for instance.
The file 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@
How can you source in .screenrc?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用绝对路径不能跨机器移植(例如,如果您使用 git 或 svn 在您登录的服务器之间同步 .rc 文件)。 更好的是使用 $HOME 变量,它在 .screenrc 文件中工作。 例如:
这样,如果您使用 .screenrc 的一台计算机的主目录为 /home/yourname,另一台计算机的主目录为 /Users/yourname,另一台计算机的主目录为 /opt/export/yourname,那么一切仍然可以正常工作。
using an absolute path is not portable across machines (for instance, if you use git or svn to sync your .rc files across servers you log into). Much better is to use the $HOME variable, which works in a .screenrc file. E.g.:
This way, if one machine on which you use your .screenrc has a home directory of /home/yourname, and another has /Users/yourname, and another has /opt/export/yourname, it'll all still just work.
尝试使用
代替。 我的猜测是屏幕不支持在这种情况下扩展〜。
如果这不起作用,我认为您应该调查以找出它抱怨“没有这样的文件或目录”的确切文件名。 您可以使用 strace 来记录系统调用。
Try to use
instead. My guess is that screen does not support expanding ~ in that context.
If that does not work I think you should investigate to find out exactly which file name it complains "No such file or directory" about. You can use strace to log system calls for this.