aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2022-06-27 11:23:39 +0100
committerRon Yorston <rmy@pobox.com>2022-06-27 11:23:39 +0100
commitb0f279a48f5f7e57b6f6e941e4b59e9a1bc54548 (patch)
tree86430f2929d8e3eb162bcb83c512bf8a0fffe322 /shell
parent164a4253b1b16f3923b175f425074ef2d1b04377 (diff)
parent2617a5e4c600b4577b2c18f794701276e55da43b (diff)
downloadbusybox-w32-b0f279a48f5f7e57b6f6e941e4b59e9a1bc54548.tar.gz
busybox-w32-b0f279a48f5f7e57b6f6e941e4b59e9a1bc54548.tar.bz2
busybox-w32-b0f279a48f5f7e57b6f6e941e4b59e9a1bc54548.zip
Merge branch 'busybox' into merge
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c7
-rw-r--r--shell/hush.c5
2 files changed, 5 insertions, 7 deletions
diff --git a/shell/ash.c b/shell/ash.c
index b34ed67a7..28c7fe2db 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -10611,7 +10611,7 @@ evalpipe(union node *n, int flags)
10611} 10611}
10612 10612
10613/* setinteractive needs this forward reference */ 10613/* setinteractive needs this forward reference */
10614#if EDITING_HAS_get_exe_name 10614#if ENABLE_FEATURE_EDITING
10615static const char *get_builtin_name(int i) FAST_FUNC; 10615static const char *get_builtin_name(int i) FAST_FUNC;
10616#endif 10616#endif
10617 10617
@@ -10648,9 +10648,8 @@ setinteractive(int on)
10648#if ENABLE_FEATURE_EDITING 10648#if ENABLE_FEATURE_EDITING
10649 if (!line_input_state) { 10649 if (!line_input_state) {
10650 line_input_state = new_line_input_t(FOR_SHELL | WITH_PATH_LOOKUP); 10650 line_input_state = new_line_input_t(FOR_SHELL | WITH_PATH_LOOKUP);
10651# if EDITING_HAS_get_exe_name
10652 line_input_state->get_exe_name = get_builtin_name; 10651 line_input_state->get_exe_name = get_builtin_name;
10653# endif 10652 line_input_state->sh_get_var = lookupvar;
10654 } 10653 }
10655#endif 10654#endif
10656 } 10655 }
@@ -11157,7 +11156,7 @@ find_builtin(const char *name)
11157 return bp; 11156 return bp;
11158} 11157}
11159 11158
11160#if EDITING_HAS_get_exe_name 11159#if ENABLE_FEATURE_EDITING
11161static const char * FAST_FUNC 11160static const char * FAST_FUNC
11162get_builtin_name(int i) 11161get_builtin_name(int i)
11163{ 11162{
diff --git a/shell/hush.c b/shell/hush.c
index ae81f0da5..051b123e7 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -8188,7 +8188,7 @@ static const struct built_in_command *find_builtin(const char *name)
8188 return find_builtin_helper(name, bltins2, &bltins2[ARRAY_SIZE(bltins2)]); 8188 return find_builtin_helper(name, bltins2, &bltins2[ARRAY_SIZE(bltins2)]);
8189} 8189}
8190 8190
8191#if ENABLE_HUSH_JOB && EDITING_HAS_get_exe_name 8191#if ENABLE_HUSH_JOB && ENABLE_FEATURE_EDITING
8192static const char * FAST_FUNC get_builtin_name(int i) 8192static const char * FAST_FUNC get_builtin_name(int i)
8193{ 8193{
8194 if (/*i >= 0 && */ i < ARRAY_SIZE(bltins1)) { 8194 if (/*i >= 0 && */ i < ARRAY_SIZE(bltins1)) {
@@ -10668,9 +10668,8 @@ int hush_main(int argc, char **argv)
10668 10668
10669# if ENABLE_FEATURE_EDITING 10669# if ENABLE_FEATURE_EDITING
10670 G.line_input_state = new_line_input_t(FOR_SHELL); 10670 G.line_input_state = new_line_input_t(FOR_SHELL);
10671# if EDITING_HAS_get_exe_name
10672 G.line_input_state->get_exe_name = get_builtin_name; 10671 G.line_input_state->get_exe_name = get_builtin_name;
10673# endif 10672 G.line_input_state->sh_get_var = get_local_var_value;
10674# endif 10673# endif
10675# if ENABLE_HUSH_SAVEHISTORY && MAX_HISTORY > 0 10674# if ENABLE_HUSH_SAVEHISTORY && MAX_HISTORY > 0
10676 { 10675 {