[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Would a patch to execute "startup configuration code" be welcome?
From: |
thi |
Subject: |
Re: Would a patch to execute "startup configuration code" be welcome? |
Date: |
Sat, 13 Jan 2001 22:22:08 -0800 |
From: Rob Browning <address@hidden>
Date: 13 Jan 2001 21:33:20 -0600
One thing I've often wanted in guile is the ability to execute, from
the command line, various bits of code, via multiple command line
args, whose presence wouldn't have *any* effect on further option
processing.
The "-c" option isn't appropriate for this because only one -c is
allowed, and when present causes guile to unavoidably quit after the
given code is executed.
The place this is particularly useful is if you want to create guile
scripts that are customized in a particular way. For example:
#!/bin/sh
export LD_LIBRARY_PATH=/dir/with/sub-lib/needed/by/libcustomization.so
exec guile \
-??? '(set! %load-path (cons "somedir" %load-path))' \
-??? '(use-modules (some special customization))' \
-??? '(initialize-something-important)' \
"$@"
Would there be any interest in a patch to accomplish this, and if so,
what character should ??? be?
for this example, the same effect can be achieved with:
#!/bin/sh
export LD_LIBRARY_PATH=/dir/with/sub-lib/needed/by/libcustomization.so
exec guile -s $0 "$@"
!#
(set! %load-path (cons "somedir" %load-path))
(use-modules (some special customization))
(initialize-something-important)
;;; eof
with less quoting hair. does this work for you?
thi