mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-11-14 10:23:55 +01:00
commit bash-20151113 snapshot
This commit is contained in:
1 parent
f542be5d52
commit
f9b024c839
15 files changed
+148
-49
No files matched your search
@@ -56,6 +56,7 @@
|
||||
|
||||
extern int line_number, current_command_line_count, parser_state;
|
||||
extern int last_command_exit_value;
|
||||
extern int shell_initialized;
|
||||
|
||||
/* Object caching */
|
||||
sh_obj_cache_t wdcache = {0, 0, 0};
|
||||
@@ -793,11 +794,18 @@ make_function_def (name, command, lineno, lstart)
|
||||
if (bash_source_a && array_num_elements (bash_source_a) > 0)
|
||||
temp->source_file = array_reference (bash_source_a, 0);
|
||||
#endif
|
||||
/* Assume that shell functions without a source file before the shell is
|
||||
initialized come from the environment. Otherwise default to "main"
|
||||
(usually functions being defined interactively) */
|
||||
if (temp->source_file == 0)
|
||||
temp->source_file = shell_initialized ? "main" : "environment";
|
||||
|
||||
#if defined (DEBUGGER)
|
||||
bind_function_def (name->word, temp);
|
||||
#endif
|
||||
|
||||
temp->source_file = temp->source_file ? savestring (temp->source_file) : 0;
|
||||
|
||||
return (make_command (cm_function_def, (SIMPLE_COM *)temp));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user