无法在 .screenrc 中获取源代码

发布于 2024-07-19 08:16:05 字数 992 浏览 14 评论 0原文

我的 .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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

甜宝宝 2024-07-26 08:16:05

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

source $HOME/bin/Screen/multiUserSettings

这样,如果您使用 .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.:

source $HOME/bin/Screen/multiUserSettings

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.

£烟消云散 2024-07-26 08:16:05

尝试使用

source /home/yourname/bin/Screen/multiUserSettings

代替。 我的猜测是屏幕不支持在这种情况下扩展〜。

如果这不起作用,我认为您应该调查以找出它抱怨“没有这样的文件或目录”的确切文件名。 您可以使用 strace 来记录系统调用。

Try to use

source /home/yourname/bin/Screen/multiUserSettings

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文