aboutsummaryrefslogtreecommitdiffhomepage
path: root/function.c
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-07-13 00:22:42 +1000
committerGravatar axel <axel@liljencrantz.se>2006-07-13 00:22:42 +1000
commit9e304fa7340b8b74a604564cb44e426cafbe7d34 (patch)
tree4ca660a0d35b26a21b293ae885592b8f2760f316 /function.c
parent6d9631d0d0798219223026cf1120a83ff2bb25c6 (diff)
Overhaul of the script autoloader. This should make sure that old scripts are unloaded and new scripts are loaded when the fish_function_path and fish_complete_path variables change
darcs-hash:20060712142242-ac50b-3966a0e96a32facc8bc1164d6d0837fc551e4733.gz
Diffstat (limited to 'function.c')
-rw-r--r--function.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/function.c b/function.c
index 345e4aa9..5989fd22 100644
--- a/function.c
+++ b/function.c
@@ -225,7 +225,7 @@ void function_remove( const wchar_t *name )
event_t ev;
CHECK( name, );
-
+
hash_remove( &function,
name,
&key,
@@ -241,6 +241,16 @@ void function_remove( const wchar_t *name )
event_remove( &ev );
clear_function_entry( key, d );
+
+ /*
+ Notify the autoloader that the specified function is erased, but
+ only if this call to fish_remove is not made by the autoloader
+ itself.
+ */
+ if( !is_autoload )
+ {
+ parse_util_unload( name, L"fish_function_path", 0 );
+ }
}
const wchar_t *function_get_definition( const wchar_t *argv )