Erase all completions with complete -c foo -e

When passing `-e` to `complete -c foo` without any other options, all
options for the command should be erased.

Fixes #380.
This commit is contained in:
Kevin Ballard 2014-09-02 15:10:52 -07:00
parent edd4f3d5ad
commit 2820c7a9cd

View file

@ -224,6 +224,14 @@ static void builtin_complete_remove2(const wchar_t *cmd,
} }
} }
} }
else if (gnu_opt.empty() && old_opt.empty())
{
complete_remove(cmd,
cmd_type,
0,
0,
0);
}
else else
{ {
builtin_complete_remove3(cmd, builtin_complete_remove3(cmd,