cd's special autosuggestion was broken, now fixed. Also, there's some tests for it now.
This commit is contained in:
ridiculousfish
2012-05-13 20:19:02 -07:00
parent c15975113a
commit 129525af21
5 changed files with 99 additions and 26 deletions

View File

@@ -115,6 +115,11 @@ bool autosuggest_special_validate_from_history(const wcstring &str, const wcstri
*/
bool autosuggest_suggest_special(const wcstring &str, const wcstring &working_directory, wcstring &outString);
/* Tests whether the specified string cpath is the prefix of anything we could cd to. directories is a list of possible parent directories (typically either the working directory, or the cdpath). This does I/O!
This is used only internally to this file, and is exposed only for testing.
*/
bool is_potential_path(const wcstring &const_path, const wcstring_list_t &directories, bool require_dir = false, wcstring *out_path = NULL);
#endif