Command line functions

This file contains functions to interact with the command line.

If you want to bind them to keyboard shortcuts, be sure to prefix them with "ex.". For example, if you want to bind control-p to prev_completion, use:

bind --mode=ex <C-p> ex.prev_completion

Note that you can also bind Tridactyl's editor functions in the command line.

Contrary to the main tridactyl help page, this one doesn't tell you whether a specific function is bound to something. For now, you'll have to make do with :bind and :viewconfig.

accept_line
complete
copy_completion
deselect_completion
execute_ex_on_all_completions
execute_ex_on_completion
execute_ex_on_completion_args
hide_and_clear
insert_character_or_completion
insert_completion
insert_space
insert_space_or_completion
is_valid_commandline
next_completion
next_history
next_history_or_completion
prev_completion
prev_history
prev_history_or_completion
refresh_completions
store_ex_string
  • Execute the content of the command line and hide it.

    Returns Promise<any>

  • Insert the first command line history line that starts with the content of the command line in the command line.

    Returns Promise<any>

  • Parameters

    • excmd: string

    Returns Promise<any[]>

  • Parameters

    • excmd: string

    Returns Promise<any>

  • Parameters

    • excmd: string

    Returns Promise<any>

  • Hide the command line and cmdline_state.clear its content without executing it. *

    Returns Promise<void>

  • Inserts the selected completion, or its argument/keybinding character.

    Parameters

    • Optionalcharacter: string

    Returns any

  • Inserts the currently selected completion and a space in the command line.

    Returns Promise<any[]>

  • If a completion is selected, inserts it in the command line with a space. If no completion is selected, inserts a space where the caret is.

    Returns any

  • Check if the command is valid

    Parameters

    • command: string

    Returns boolean

  • Selects the next completion.

    Parameters

    • increment: string = "1"

    Returns Promise<void>

  • Selects the next completion, or history line if none is selected.

    Returns any

  • Selects the previous completion.

    Parameters

    • increment: string = "1"

    Returns Promise<void>

  • Selects the previous completion, or history line if none is selected.

    Returns any

  • Parameters

    • exstr: any

    Returns Promise<void[]>

  • Save non-secret commands to the cmdHistory and update the cmdline_history_position

    Parameters

    • command: string

    Returns void