getCommandlineFns
  • Parameters

    • cmdline_state: {
          fns: {
              accept_line: () => Promise<any>;
              complete: () => Promise<any>;
              copy_completion: () => Promise<any>;
              deselect_completion: () => void;
              execute_ex_on_all_completions: (excmd: string) => Promise<any[]>;
              execute_ex_on_completion: (excmd: string) => Promise<any>;
              execute_ex_on_completion_args: (excmd: string) => Promise<any>;
              hide_and_clear: () => void;
              insert_character_or_completion: (character?: string) => any;
              insert_completion: () => Promise<any[]>;
              insert_space: () => void;
              insert_space_or_completion: () => any;
              is_valid_commandline: (command: string) => boolean;
              next_completion: (increment?: string) => Promise<void>;
              next_history: () => any;
              next_history_or_completion: () => any;
              prev_completion: (increment?: string) => Promise<void>;
              prev_history: () => any;
              prev_history_or_completion: () => any;
              store_ex_string: (command: string) => void;
          };
          [otherStuff: string]: any;
      }

    Returns {
        accept_line: () => Promise<any>;
        complete: () => Promise<any>;
        copy_completion: () => Promise<any>;
        deselect_completion: () => void;
        execute_ex_on_all_completions: (excmd: string) => Promise<any[]>;
        execute_ex_on_completion: (excmd: string) => Promise<any>;
        execute_ex_on_completion_args: (excmd: string) => Promise<any>;
        hide_and_clear: () => void;
        insert_character_or_completion: (character?: string) => any;
        insert_completion: () => Promise<any[]>;
        insert_space: () => void;
        insert_space_or_completion: () => any;
        is_valid_commandline: (command: string) => boolean;
        next_completion: (increment?: string) => Promise<void>;
        next_history: () => any;
        next_history_or_completion: () => any;
        prev_completion: (increment?: string) => Promise<void>;
        prev_history: () => any;
        prev_history_or_completion: () => any;
        store_ex_string: (command: string) => void;
    }

    • accept_line: () => Promise<any>

      Execute the content of the command line and hide it.

    • complete: () => Promise<any>

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

    • copy_completion: () => Promise<any>
    • deselect_completion: () => void

      Deselects the currently selected completion.

    • execute_ex_on_all_completions: (excmd: string) => Promise<any[]>
    • execute_ex_on_completion: (excmd: string) => Promise<any>
    • execute_ex_on_completion_args: (excmd: string) => Promise<any>
    • hide_and_clear: () => void

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

    • insert_character_or_completion: (character?: string) => any

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

    • insert_completion: () => Promise<any[]>

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

    • insert_space: () => void

      Insert a space

    • insert_space_or_completion: () => 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.

    • is_valid_commandline: (command: string) => boolean

      Check if the command is valid

    • next_completion: (increment?: string) => Promise<void>

      Selects the next completion.

    • next_history: () => any

      Selects the next history line.

    • next_history_or_completion: () => any

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

    • prev_completion: (increment?: string) => Promise<void>

      Selects the previous completion.

    • prev_history: () => any

      Selects the prev history line.

    • prev_history_or_completion: () => any

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

    • store_ex_string: (command: string) => void

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