def pan_down(event): """ Pans the example pan down""" global _SECTION telemetry.track_key('ControlN') if _SECTION < 10: _SECTION += 1
def pan_up(event): """ Pans the example pan up""" global _SECTION telemetry.track_key('ControlY') if _SECTION > 1: _SECTION -= 1
def config_settings(event): """ opens the configuration """ global PROMPTING telemetry.track_key('F1') PROMPTING = True config = azclishell.configuration.CONFIGURATION answer = "" questions = { "Do you want command descriptions": "command_description", "Do you want parameter descriptions": "param_description", "Do you want examples": "examples" } for question in questions: while answer.lower() != 'y' and answer.lower() != 'n': answer = prompt(u'\n%s (y/n): ' % question) config.set_val('Layout', questions[question], format_response(answer)) answer = "" PROMPTING = False print("\nPlease restart shell for changes to take effect.\n\n") event.cli.set_return_value(event.cli.current_buffer)
def exit_(event): """ exits the program when Control D is pressed """ telemetry.track_key('ControlD') event.cli.set_return_value(None)
def toggle_symbols(event): """ shows the symbol bindings""" global SYMBOLS telemetry.track_key('F3') SYMBOLS = not SYMBOLS
def toggle_default(event): """ shows the defaults""" global SHOW_DEFAULT telemetry.track_key('F2') SHOW_DEFAULT = not SHOW_DEFAULT