diff options
-rwxr-xr-x | bin/cl | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -53,6 +53,7 @@ help() { Options: -e EXP an sexp to be evaluated (can be given more than once) + -E EXP an sexp to be executed as a script -f FILE a file to be evaluated (can be given more than once) -p print the value of the last given expression -M IMAGE load the given Lisp image @@ -139,11 +140,16 @@ LISP_CLI_RC="${XDG_CONFIG_HOME:-$HOME/.config}/lisp-cli/init.lisp" VERBOSE=false IMAGE='' IMPL="${LISP_CLI_IMPL:-}" -while getopts 'e:f:pM:I:nvlh' flag; do +INTERACTIVE=true +while getopts 'e:E:f:pM:I:nvlh' flag; do case "$flag" in e) printf '%s\n' "$OPTARG" >> "$SCRIPT" ;; + E) + printf '%s\n' "$OPTARG" >> "$SCRIPT" + INTERACTIVE=false + ;; f) escape_name "$OPTARG" >> "$SCRIPT" ;; @@ -183,7 +189,6 @@ if [ "$1" != '--' ]; then fi PRESERVE_ARGS=false -INTERACTIVE=true for f in "$@"; do if [ "$f" = '--' ]; then PRESERVE_ARGS=true |