diff --git a/complete.c b/complete.c index 539f44d58..255a3d718 100644 --- a/complete.c +++ b/complete.c @@ -2131,7 +2131,7 @@ void complete( const wchar_t *cmd, { wchar_t *ncmd = tok_last( &tok ); - int is_ddash = wcscmp( ncmd, L"--" ) == 0; + int is_ddash = (wcscmp( ncmd, L"--" ) == 0) && ( (tok_get_pos( &tok )+2) < pos ); if( !had_cmd ) {