Don't tab complete invalid input

Products and users that begin with `+` are internal, as are users that
begin with `-`. These should be excluded from tab completion.
This commit is contained in:
Juerd Waalboer 2023-01-30 17:19:50 +01:00
parent 382940bfc9
commit 9045eb7ff4
2 changed files with 3 additions and 2 deletions

View file

@ -151,5 +151,5 @@ sub command :Tab(&tab) ($self, $cart, $command, @) {
}
sub tab {
return grep /\D/, keys %{ read_products() };
return grep !/^\+/, grep /\D/, keys %{ read_products() };
}