aboutsummaryrefslogtreecommitdiffhomepage
path: root/autoload.h
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-02-26 20:11:34 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-02-26 20:11:34 -0800
commitf74a82776f9a20f09149712d50cee557d8302ec0 (patch)
treec24d45936ba2d272035709f8dd7f8943cd24f5c8 /autoload.h
parent3553e650891db84b3feffaef872d378c750f807b (diff)
Some more changes in preparation for turning on complete-based autosuggestions
Diffstat (limited to 'autoload.h')
-rw-r--r--autoload.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/autoload.h b/autoload.h
index 2d060488..b94876a7 100644
--- a/autoload.h
+++ b/autoload.h
@@ -26,10 +26,11 @@ file_access_attempt_t access_file(const wcstring &path, int mode);
struct autoload_function_t : public lru_node_t
{
- autoload_function_t(const wcstring &key) : lru_node_t(key), is_loaded(false), is_placeholder(false) { bzero(&access, sizeof access); }
+ autoload_function_t(const wcstring &key) : lru_node_t(key), access(), is_loaded(false), is_placeholder(false), is_internalized(false) { }
file_access_attempt_t access; /** The last access attempt */
bool is_loaded; /** Whether we have actually loaded this function */
bool is_placeholder; /** Whether we are a placeholder that stands in for "no such function". If this is true, then is_loaded must be false. */
+ bool is_internalized; /** Whether this function came from a builtin "internalized" script */
};
@@ -75,7 +76,8 @@ private:
virtual void node_was_evicted(autoload_function_t *node);
-
+ autoload_function_t *get_autoloaded_function_with_creation(const wcstring &cmd, bool allow_eviction);
+
protected:
/** Overridable callback for when a command is removed */
virtual void command_removed(const wcstring &cmd) { }
@@ -100,6 +102,9 @@ private:
\param reload wheter to recheck file timestamps on already loaded files
*/
int load( const wcstring &cmd, bool reload );
+
+ /** Check whether we have tried loading the given command. Does not do any I/O. */
+ bool has_tried_loading( const wcstring &cmd );
/**
Tell the autoloader that the specified file, in the specified path,