From 8000a4a1bbe5685bf096971563743424ed60c78a Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 12 Jun 2019 18:55:55 -0700 Subject: Renamed command->script in more places to avoid confusion. --- bb.c | 12 ++++++------ config.def.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bb.c b/bb.c index 1fc0539..827ec45 100644 --- a/bb.c +++ b/bb.c @@ -259,9 +259,9 @@ void* memcheck(void *p) } /* - * Run a command with the selected files passed as sequential arguments to the - * command (or pass the cursor file if none are selected). - * Return the exit status of the command. + * Run a shell script with the selected files passed as sequential arguments to + * the script (or pass the cursor file if none are selected). + * Return the exit status of the script. */ int run_script(bb_t *bb, const char *cmd) { @@ -1321,13 +1321,13 @@ void bb_browse(bb_t *bb, const char *path) run_binding: if (cmdpos != 0) err("Command file still open"); - if (binding->command[0] == '+') { - process_cmd(bb, binding->command + 1); + if (binding->script[0] == '+') { + process_cmd(bb, binding->script + 1); } else { move_cursor(tty_out, 0, termheight-1); fputs(T_ON(T_SHOW_CURSOR), tty_out); close_term(); - run_script(bb, binding->command); + run_script(bb, binding->script); init_term(); fputs(T_ON(T_ALT_SCREEN), tty_out); check_cmds = 1; diff --git a/config.def.h b/config.def.h index e715a11..1468eec 100644 --- a/config.def.h +++ b/config.def.h @@ -68,7 +68,7 @@ // Types: typedef struct { int keys[MAX_REBINDINGS+1]; - const char *command; + const char *script; const char *description; } binding_t; @@ -210,7 +210,7 @@ binding_t bindings[] = { {{'r'}, "bb +refresh; " "for f; do " - " if r=\"$(dirname \"$f\")/$("ASKECHO("rename: ", "$(basename \"$f\")")")\"; then " + " if r=\"$(dirname \"$f\")/$("ASKECHO("Rename: ", "$(basename \"$f\")")")\"; then " " if test \"$r\" != \"$f\" && mv -i \"$f\" \"$r\"; then " " test $BBSELECTED && bb \"+deselect:$f\" \"+select:$r\"; " " fi; " -- cgit v1.2.3