Add unlimited

This commit is contained in:
Antonio J. Delgado 2024-11-21 09:45:17 +02:00
parent 24ef0b01ea
commit ffacb64b1f

View file

@ -1312,7 +1312,7 @@ class NcPasswordClient:
password
)
count += 1
if count >= limit:
if limit != -1 and count >= limit:
return True
self.info(
{
@ -1490,7 +1490,7 @@ def delete_passwords_folder(ctx, name):
@cli.command()
@click.option('--pattern', '-p', required=True, help='Regular expression pattern to search in the password fields')
@click.option('--limit', '-l', default=1, help='Maximun number of passwords to show')
@click.option('--limit', '-l', default=-1, help='Maximun number of passwords to show. -1 for unlimited.')
@click_config_file.configuration_option()
@click.pass_context
def search(ctx, pattern, limit):