Allow tab completion of empty command names

darcs-hash:20060521223213-ac50b-5201b7f0dfe5227f93aae6db94450e165c9a5a34.gz
This commit is contained in:
axel 2006-05-22 08:32:13 +10:00
parent b746a803a9
commit 29e86254d0

View file

@ -2025,6 +2025,25 @@ void complete( const wchar_t *cmd,
prev_token = prev_begin ? wcsndup( prev_begin, prev_end - prev_begin ): wcsdup(L"");
// fwprintf( stderr, L"on_command: %d, %ls %ls\n", on_command, current_compmand, current_token );
if( !had_cmd )
{
on_command=1;
}
if( !current_token )
{
current_token = wcsdup(L"");
}
if( !current_command )
{
current_command = wcsdup(L"");
}
if( !prev_token )
{
prev_token = wcsdup(L"");
}
if( current_token && current_command && prev_token )
{