Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

commands:source [2010-01-26 17:13] (current)
asciiphil created
Line 1: Line 1:
 +====== source ======
 +
 +===== Default Keybindings =====
 +
 +None.
 +
 +===== Syntax =====
 +
 +  * ''**source** //file//''
 +
 +===== Description =====
 +
 +Read and execute commands from file //file// Source commands may be
 +nested to a maximum recursion level of ten.  If file is not an absolute
 +path and ''screen'' is already processing a ''source'' command, the parent
 +directory of the running ''source'' command file is used to search for the
 +new command file before ''screen'''s current directory.
 +
 +Note that ''[[termcap]]''/''[[terminfo]]''/''[[termcapinfo]]'' commands
 +only work at startup and reattach time, so they must be reached via the
 +default screenrc files to have an effect.
 +
 +===== Examples =====
 +
 +<code>
 +source .screenrc-$HOST
 +</code>
 +
 +Loads a host-specific .screenrc file.  This assumes an environment
 +variable named $HOST, which is not standard on all systems.
 +
 +<code>
 +bind l source $HOME/layout
 +</code>
 +
 +Binds the sequence ''C-a l'' to load a .screenrc-type file named "layout".
 +This might set up the display in particular ways.  Sourcing a file can be
 +a more convenient way to run several ''screen'' commands than using
 +''[[eval]]''.
 +
 +===== See Also =====
 +
 +  * [[:Misc]]
  

User Tools