The Code
@app.command('mssql', short_help='Backup Microsoft SQL database(s).')
@click.argument('backup_type', metavar='type')
def mssql(backup_type):
click.echo('Running the backup...')
Expected Output
(backupdb)rsyring@loftex:~/projects/backup-db-src$ backupdb mssql
Usage: backupdb mssql [OPTIONS] type
Error: Missing argument "type".
Actual Output
Note that the metavar parameter is used in "Usage" but not when notifying the user about the missing argument:
(backupdb)rsyring@loftex:~/projects/backup-db-src$ backupdb mssql
Usage: backupdb mssql [OPTIONS] type
Error: Missing argument "backup_type".
The Code
Expected Output
Actual Output
Note that the metavar parameter is used in "Usage" but not when notifying the user about the missing argument: