Example #1
0
def completer():
    list = []

    for name in history():
        list.append(name)

    return WordCompleter(set(list), ignore_case=True)
Example #2
0
def completer():
    list = []

    for name in history():
        list.append(name)

    return WordCompleter(set(list), ignore_case=True)
Example #3
0
    def print_history(self):
        print('\nLast ten entries from history:')

        entries = history()

        qty = len(entries)

        for entry in entries[qty-10:qty]:
            print(entry)
Example #4
0
def completer():
    s = set()

    history_strings = history().load_history_strings()

    for name in history_strings:
        s.add(name)

    return WordCompleter(list(s), ignore_case=True)
Example #5
0
    def print_history(self):
        print('\nLast ten entries from history:')

        entries = history()

        qty = len(entries)

        for entry in entries[qty-10:qty]:
            print(entry)
Example #6
0
def custom_prompt():
    return prompt(get_prompt_tokens=get_prompt_tokens,
                  history=history(),
                  auto_suggest=AutoSuggestFromHistory(),
                  enable_history_search=True,
                  on_abort=AbortAction.RETRY,
                  get_bottom_toolbar_tokens=get_bottom_toolbar_tokens,
                  completer=completer(),
                  complete_while_typing=True,
                  style=style)
Example #7
0
def custom_prompt(currentSong):
    return prompt(
        get_prompt_tokens=get_prompt_tokens,
        history=history(),
        auto_suggest=AutoSuggestFromHistory(),
        enable_history_search=True,
        on_abort=AbortAction.RETRY,
        get_bottom_toolbar_tokens=get_bottom_toolbar_tokens(currentSong),
        completer=completer(),
        complete_while_typing=True,
        style=style
    )
Example #8
0
def custom_prompt(currentSong):

    session = PromptSession(message=get_prompt,
                            history=history(),
                            auto_suggest=AutoSuggestFromHistory(),
                            enable_history_search=True,
                            bottom_toolbar=get_bottom_toolbar(currentSong),
                            completer=completer(),
                            complete_while_typing=True,
                            complete_in_thread=True,
                            style=style)

    return session.prompt()