diff options
author | Denys Vlasenko | 2023-01-03 08:28:16 +0100 |
---|---|---|
committer | Denys Vlasenko | 2023-01-03 08:28:16 +0100 |
commit | 27be0e8cfeb6f0f7a66bbfb2a6ca23d5a064e6ab (patch) | |
tree | bf56f6d0d922cf3eefb0e413e9326a2e60373dd8 /shell | |
parent | 8ed57db65ba66709d3b4061c4f03766f1fe58780 (diff) | |
download | busybox-27be0e8cfeb6f0f7a66bbfb2a6ca23d5a064e6ab.zip busybox-27be0e8cfeb6f0f7a66bbfb2a6ca23d5a064e6ab.tar.gz |
shell: fix compile failures in some configs
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 8 | ||||
-rw-r--r-- | shell/hush.c | 6 |
2 files changed, 11 insertions, 3 deletions
diff --git a/shell/ash.c b/shell/ash.c index 326f8b2..99fdbce 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -9736,7 +9736,7 @@ evalpipe(union node *n, int flags) } /* setinteractive needs this forward reference */ -#if ENABLE_FEATURE_EDITING +#if ENABLE_FEATURE_TAB_COMPLETION static const char *get_builtin_name(int i) FAST_FUNC; #endif @@ -9773,8 +9773,12 @@ setinteractive(int on) #if ENABLE_FEATURE_EDITING if (!line_input_state) { line_input_state = new_line_input_t(FOR_SHELL | WITH_PATH_LOOKUP); +# if ENABLE_FEATURE_TAB_COMPLETION line_input_state->get_exe_name = get_builtin_name; +# endif +# if EDITING_HAS_sh_get_var line_input_state->sh_get_var = lookupvar; +# endif } #endif } @@ -10283,7 +10287,7 @@ find_builtin(const char *name) return bp; } -#if ENABLE_FEATURE_EDITING +#if ENABLE_FEATURE_TAB_COMPLETION static const char * FAST_FUNC get_builtin_name(int i) { diff --git a/shell/hush.c b/shell/hush.c index 051b123..6930992 100644 --- a/shell/hush.c +++ b/shell/hush.c @@ -8188,7 +8188,7 @@ static const struct built_in_command *find_builtin(const char *name) return find_builtin_helper(name, bltins2, &bltins2[ARRAY_SIZE(bltins2)]); } -#if ENABLE_HUSH_JOB && ENABLE_FEATURE_EDITING +#if ENABLE_HUSH_JOB && ENABLE_FEATURE_TAB_COMPLETION static const char * FAST_FUNC get_builtin_name(int i) { if (/*i >= 0 && */ i < ARRAY_SIZE(bltins1)) { @@ -10668,8 +10668,12 @@ int hush_main(int argc, char **argv) # if ENABLE_FEATURE_EDITING G.line_input_state = new_line_input_t(FOR_SHELL); +# if ENABLE_FEATURE_TAB_COMPLETION G.line_input_state->get_exe_name = get_builtin_name; +# endif +# if EDITING_HAS_sh_get_var G.line_input_state->sh_get_var = get_local_var_value; +# endif # endif # if ENABLE_HUSH_SAVEHISTORY && MAX_HISTORY > 0 { |