Exemplo n.º 1
0
 def register_special_commands(self):
     special.register_special_command(self.change_db, 'use',
             '\\u', 'Change to a new database.', aliases=('\\u',))
     special.register_special_command(self.change_db, 'connect',
             '\\r', 'Reconnect to the database. Optional database argument.',
             aliases=('\\r', ))
     special.register_special_command(self.refresh_dynamic_completions, 'rehash',
             '\\#', 'Refresh auto-completions.', arg_type=NO_QUERY, aliases=('\\#',))
     special.register_special_command(self.change_table_format, 'tableformat',
             '\\T', 'Change Table Type.', aliases=('\\T',), case_sensitive=True)
     special.register_special_command(self.execute_from_file, 'source', '\\. filename',
                           'Execute commands from file.', aliases=('\\.',))
Exemplo n.º 2
0
Arquivo: main.py Projeto: pranav/mycli
 def register_special_commands(self):
     special.register_special_command(self.change_db, "use", "\\u", "Change to a new database.", aliases=("\\u",))
     special.register_special_command(
         self.change_db, "connect", "\\r", "Reconnect to the database. Optional database argument.", aliases=("\\r",)
     )
     special.register_special_command(
         self.refresh_dynamic_completions,
         "rehash",
         "\\#",
         "Refresh auto-completions.",
         arg_type=NO_QUERY,
         aliases=("\\#",),
     )
     special.register_special_command(
         self.change_table_format, "tableformat", "\\T", "Change Table Type.", aliases=("\\T",), case_sensitive=True
     )
     special.register_special_command(
         self.execute_from_file, "source", "\\. filename", "Execute commands from file.", aliases=("\\.",)
     )
Exemplo n.º 3
0
Arquivo: main.py Projeto: npk/mycli
 def register_special_commands(self):
     special.register_special_command(self.change_db, 'use',
             '\\u', 'Change to a new database.', aliases=('\\u',))
     special.register_special_command(self.change_db, 'connect',
             '\\r', 'Reconnect to the database. Optional database argument.',
             aliases=('\\r', ))
     special.register_special_command(self.refresh_dynamic_completions, 'rehash',
             '\\#', 'Refresh auto-completions.', arg_type=NO_QUERY, aliases=('\\#',))
Exemplo n.º 4
0
 def register_special_commands(self):
     special.register_special_command(self.change_db, "use", "\\u", "Change to a new database.", aliases=("\\u",))
     special.register_special_command(
         self.change_db, "connect", "\\r", "Reconnect to the database. Optional database argument.", aliases=("\\r",)
     )
     special.register_special_command(
         self.refresh_dynamic_completions,
         "rehash",
         "\\#",
         "Refresh auto-completions.",
         arg_type=NO_QUERY,
         aliases=("\\#",),
     )
Exemplo n.º 5
0
 def register_special_commands(self):
     special.register_special_command(self.change_db,
                                      'use',
                                      '\\u',
                                      'Change to a new database.',
                                      aliases=('\\u', ))
     special.register_special_command(
         self.change_db,
         'connect',
         '\\r',
         'Reconnect to the database. Optional database argument.',
         aliases=('\\r', ),
         case_sensitive=True)
     special.register_special_command(self.refresh_completions,
                                      'rehash',
                                      '\\#',
                                      'Refresh auto-completions.',
                                      arg_type=NO_QUERY,
                                      aliases=('\\#', ))
     special.register_special_command(
         self.change_table_format,
         'tableformat',
         '\\T',
         'Change the table format used to output results.',
         aliases=('\\T', ),
         case_sensitive=True)
     special.register_special_command(self.execute_from_file,
                                      'source',
                                      '\\. filename',
                                      'Execute commands from file.',
                                      aliases=('\\.', ))
     special.register_special_command(self.change_prompt_format,
                                      'prompt',
                                      '\\R',
                                      'Change prompt format.',
                                      aliases=('\\R', ),
                                      case_sensitive=True)