From 16e0fd55359044eec81cdd2354e7fbf07291a102 Mon Sep 17 00:00:00 2001 From: shivers Date: Sun, 7 Nov 1999 03:11:43 +0000 Subject: [PATCH] Added library directory path search command-line switches. --- scsh/top.scm | 177 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 170 insertions(+), 7 deletions(-) diff --git a/scsh/top.scm b/scsh/top.scm index 45ada39..14f0d0c 100644 --- a/scsh/top.scm +++ b/scsh/top.scm @@ -20,6 +20,13 @@ ;;; SCSH-LEVEL-0-INTERNALS: set-command-line-args! ;;; SCSH-VERSION: scsh-version-string ;;; +;;; More imports for the new library-search facility: +;;; HANDLE: with-handler +;;; LIST-LIB: any +;;; SCSH-LEVEL-0: directory-files open-input-file file-directory? getenv +;;; SCSH-LEVEL-0: getenv +;;; SCSH-LEVEL-0: the file-name procs + ;;; This should be defined by the package code, but it isn't. @@ -35,6 +42,16 @@ ;;; ;;; -l Load into current package. ;;; -lm Load into config package. +;;; -ll As in -lm, but search the library path list. +;;; +;;; +lp Add onto start of library path list. +;;; lp+ Add onto end of library path list. +;;; +lpe As in +lp, but expand env vars & ~user. +;;; lpe+ As in lp+, but expand env vars & ~user. +;;; +lpsd Add the script-file's directory to front of path list +;;; lpsd+ Add the script-file's directory to end of path list +;;; -lp-clear Clear library path list to (). +;;; -lp-default Reset library path list to system default. ;;; ;;; These two require a terminating -s or -sfd arg: ;;; -ds Load terminating script into current package. @@ -52,8 +69,9 @@ ;;; Return switch list, terminating switch, with arg, top-entry, ;;; and command-line args. ;;; - We first expand out any initial \ meta-arg. -;;; - A switch-list elt is either "-ds", "-dm", or a (switch . arg) pair -;;; for a -o, -n, -m, -l, or -lm switch. +;;; - A switch-list elt is either "-ds", "-dm", "-lp-clear", "-lp-default" +;;; "+lpsd", "lpsd+" or a (switch . arg) pair for a -o, -n, -m, -l, -lm, +;;; -ll, +lp, lp+, +lpe, or lpe+ switch. ;;; - Terminating switch is one of {s, c, #f} for -s or -sfd, -c, ;;; and -- respectively. ;;; - Terminating arg is the arg to -c, the