Got rid of multiple cd paths, only current directory will be searched while changing directories, implicit cd (entering directory just by typing it's name) is removed.

This commit is contained in:
Siteshwar Vashisht
2012-02-09 01:18:51 +05:30
parent 3dc56de0ae
commit bc8a288386
7 changed files with 12 additions and 50 deletions

View File

@@ -1035,9 +1035,7 @@ static void complete_cmd( const wchar_t *cmd,
std::vector<completion_t> possible_comp;
wchar_t *nxt_completion;
const env_var_t cdpath = env_get_string(L"CDPATH");
// wchar_t *cdpath_cpy = wcsdup( cdpath?cdpath:L"." );
wchar_t *cdpath_cpy = wcsdup( !cdpath.missing()?cdpath.c_str():L"." );
wchar_t *cdpath_cpy = wcsdup(L".");
if( (wcschr( cmd, L'/') != 0) || (cmd[0] == L'~' ) )
{