mitsuhiko/click — pull request #236 by amjith (2014-10-13 06:20:51+00:00)
Title: Accept empty strings via the prompt.

Currently there is no way to accept an empty string as an input from the prompt. For example the following example will keep requesting a password when the user enters an empty string at the prompt (i.e., simply presses the enter key without typing any characters).

```
@click.command()
@click.option('-h', '--host', default='localhost')
@click.option('--password', prompt=True, hide_input=True,
confirmation_prompt=False, type=str)
def cli(host, password):
print(host: %s password: %s' % (host, password))
```

The PR I've sent allows accepting empty strings. But the problem is it defaults to a string.

The use case for an empty password is a database CLI. I'm writing a CLI client for SQLite and Postgres where it's perfectly fine to have an empty password.