From edac3cf6fa162fb6d50e266fa46c8b1f24b9fcb4 Mon Sep 17 00:00:00 2001 From: mainzelm Date: Tue, 17 Dec 2002 14:40:49 +0000 Subject: [PATCH] Added description of the library-search feature related flags. --- doc/scsh-manual/running.tex | 97 ++++++++++++++++++++++++++++++++++++- 1 file changed, 96 insertions(+), 1 deletion(-) diff --git a/doc/scsh-manual/running.tex b/doc/scsh-manual/running.tex index 69fb34e..fa29c26 100644 --- a/doc/scsh-manual/running.tex +++ b/doc/scsh-manual/running.tex @@ -207,7 +207,27 @@ where & \ex{-l} \var{file-name} & Load file into current package. \\ - + + + & \ex{-ll} \var{module-file-name} + & As in -lm, but search the library path list.\\ + & \ex{+lp} \var{dir} + & Add dir to front of library path list.\\ + & \ex{lp+} \var{dir} + & Add dir to end of library path list.\\ + & \ex{+lpe} \var{dir} + & +lp, with env var and \~user expansion.\\ + & \ex{lpe+} \var{dir} + & lp+, with env var and \~user expansion.\\ + & \ex{+lpsd} + & Add script-file's dir to front of path list.\\ + & \ex{lpsd+} + & Add script-file's dir to end of path list.\\ + & \ex{-lp-clear} + & Clear library path list to ().\\ + & \ex{-lp-default} + & Reset library path list to system default.\\ + & \ex{-dm} & Do script module. \\ & \ex{-ds} & Do script. \\ \\ @@ -366,6 +386,77 @@ The following switches and end options are defined: This switch is provided to make it easy to write shell scripts in the {\scm} module language. + +\Item{-ll \var{modul-file-name}} + Load library module into config package. + This is just like the -lm switch, except that it searches the + library-directory path list for the file to load. + + Specifically, it means: search through the + \textit{library-directories} list of directories looking for a + module file of the given name, and load it in. + + The \textit{library-directories} list defaults to + \texttt{("/usr/local/lib/scsh/modules/")}. It will be + installation-dependent in a later version of scsh. + + If the environment variable \texttt{\$SCSH\_LIB\_DIRS} is set, it is + used to determine the library search path. The value of this + environment variable treated as a sequence of s-expressions, which + are ``read'' from the string: + + \begin{itemize} + \item A string is treated as a directory. + \item \sharpf{} is replaced with the default list of directories. + \end{itemize} + + A \texttt{SCSH\_LIB\_DIRS} assignment of this form + \begin{small} +\begin{verbatim} +SCSH_LIB_DIRS='"." "/usr/contrib/lib/scsh/" #f "/home/shivers/lib/scsh"' +\end{verbatim} + \end{small} + would produce this list of strings for the + \textit{library-directories} list: + \begin{verbatim} + ("." "/usr/contrib/lib/scsh/" + "/usr/local/lib/scsh/modules/" + "/home/shivers/lib/scsh") + \end{verbatim} + + When searching for a directory containing a given library module, + nonexistent or read-protected directories are silently ignored; it + is not an error to have them in the \textit{library-directories} + list. + + It is a startup error if reading the \texttt{\$SCSH\_LIB\_DIRS} + env var causes a read error, or produces a value that isn't a + string or \sharpf. + + Directory search can be recursive. A directory name that ends + with a slash is recursively searched. + +\Item{+lp \var{lib-dir},lp+ \var{lib-dir}} + Add directory \var{lib-dir} to the beginning or end of the + \textit{library-directories} path list, respectively. + + \var{lib-dir} is a single directory. It is not split at colons or + otherwise processed. + +\Item{+lpe, lpe+} + As above, except that \~ home-directory syntax and environment + variables are expanded out. + +\Item{-lp-clear, -lp-default} + Set the \textit{library-directories} path list to the empty list and + the system default, respectively. + + These two switches are useful if you would like to protect your + script from influence by the \texttt{\$SCSH\_LIB\_PATH} variable. + + In these cases, the \texttt{SCSH\_LIB\_PATH} environment variable is never + even parsed, so a bogus value will not affect the script's + execution at all. \end{itemize} \subsection{The meta argument} @@ -802,3 +893,7 @@ so \ex{scsh.image} should have a \ex{\#!} trigger of the following form: -o /usr/local/lib/scsh/scshvm -i {\ldots} \textnormal{\emph{heap image goes here}} \ldots\end{code} +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "man" +%%% End: