def add_common_options_to_cmd(cmd, database, no_password_prompt=False,
                              **kwargs):
    if database['HOST'] is not '':
        cmd.append('--host=%s' % database['HOST'])
        
    if database['PORT'] is not '':
        cmd.append('--port=%s' % database['PORT'])
        
    if no_password_prompt:
        cmd.append('--no-password')
        
    cmd.append('--username=%s' % database['USER'])
Adds some commonly used options to the given command string. psql,
dataset/ETHPy150Open duointeractive/django-fabtastic/fabtastic/db/postgres.py/add_common_options_to_cmd