Esempio n. 1
0
def pan_down(event):
    """ Pans the example pan down"""
    global _SECTION
    telemetry.track_key('ControlN')

    if _SECTION < 10:
        _SECTION += 1
Esempio n. 2
0
def pan_up(event):
    """ Pans the example pan up"""
    global _SECTION
    telemetry.track_key('ControlY')

    if _SECTION > 1:
        _SECTION -= 1
Esempio n. 3
0
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)
Esempio n. 4
0
def exit_(event):
    """ exits the program when Control D is pressed """
    telemetry.track_key('ControlD')
    event.cli.set_return_value(None)
Esempio n. 5
0
def toggle_symbols(event):
    """ shows the symbol bindings"""
    global SYMBOLS
    telemetry.track_key('F3')

    SYMBOLS = not SYMBOLS
Esempio n. 6
0
def toggle_default(event):
    """ shows the defaults"""
    global SHOW_DEFAULT
    telemetry.track_key('F2')

    SHOW_DEFAULT = not SHOW_DEFAULT