hush: fix bug where in "var=val func" var's value is not visible in func
function old new delta unset_local_var - 168 +168 set_vars_all_and_save_old - 87 +87 get_ptr_to_local_var - 77 +77 free_strings_and_unset - 53 +53 builtin_export 266 274 +8 get_local_var_value 31 33 +2 putenv_all 27 - -27 free_strings_and_unsetenv 53 - -53 get_local_var 68 - -68 run_list 2475 2350 -125 builtin_unset 380 220 -160 ------------------------------------------------------------------------------ (add/remove: 4/3 grow/shrink: 2/2 up/down: 395/-433) Total: -38 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
		
							
								
								
									
										4
									
								
								shell/hush_test/hush-misc/env_and_func.tests
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										4
									
								
								shell/hush_test/hush-misc/env_and_func.tests
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,4 @@
 | 
			
		||||
var=old
 | 
			
		||||
f() { echo "var=$var"; }
 | 
			
		||||
var=val f
 | 
			
		||||
echo "var=$var"
 | 
			
		||||
		Reference in New Issue
	
	Block a user