diff options
author | EuAndreh <eu@euandre.org> | 2022-11-02 18:32:31 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2022-11-02 18:32:31 -0300 |
commit | d412db9a1d958dc07a4f9324ec980db78dc42a49 (patch) | |
tree | ee83e82506ce4845428f9d7c9ce35ca5708c0cd7 | |
parent | bin/archiveit: Add new binary, still being validated (diff) | |
download | dotfiles-d412db9a1d958dc07a4f9324ec980db78dc42a49.tar.gz dotfiles-d412db9a1d958dc07a4f9324ec980db78dc42a49.tar.xz |
bin/cl: Add support for -E option
-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 |