Exemple #1
0
//------------------------------------------------------------------------------
static int startup_hook()
{
    static int initialised = 0;
    if (!initialised)
    {
        // This is a bit of a hack. Ideally we should take care of this in
        // the termcap functions.
        _rl_term_forward_char = "\013";
        _rl_term_clreol = "\001";

        rl_redisplay_function = display;
        rl_getc_function = getc_impl;

        rl_completer_quote_characters = "\"";
        rl_ignore_some_completions_function = postprocess_matches;
        rl_basic_word_break_characters = " <>|";
        rl_completer_word_break_characters = " <>|";
        rl_completion_display_matches_hook = display_matches;
        rl_attempted_completion_function = alternative_matches;

        rl_add_funmap_entry("clink-completion-shim", completion_shim);
        rl_add_funmap_entry("clear-line", clear_line);
        rl_add_funmap_entry("paste-from-clipboard", paste_from_clipboard);

        initialise_lua();
        load_history();
        rl_re_read_init_file(0, 0);
        rl_visible_stats = 0;               // serves no purpose under win32.

        initialised = 1;
    }
    
    return 0;
}
Exemple #2
0
//------------------------------------------------------------------------------
static int initialise_hook()
{
    rl_redisplay_function = display;
    rl_getc_function = getc_impl;

    // Invalid filename characters; <>|?*:"\/
    _rl_comment_begin = "::";
    rl_completer_quote_characters = "\"";
    rl_ignore_some_completions_function = postprocess_matches;
    rl_basic_word_break_characters = " <>|=;&";
    rl_completer_word_break_characters = (char*)rl_basic_word_break_characters;
    rl_attempted_completion_function = alternative_matches;
    if (rl_completion_display_matches_hook == NULL)
    {
        rl_completion_display_matches_hook = display_matches;
    }

    rl_basic_quote_characters = "\"";
    rl_filename_quote_characters = " %=;&^";

    rl_add_funmap_entry("clink-completion-shim", completion_shim);
    rl_add_funmap_entry("clink-menu-completion-shim", menu_completion_shim);

    clink_register_rl_funcs();
    initialise_rl_scroller();

    rl_re_read_init_file(0, 0);
    rl_visible_stats = 0;               // serves no purpose under win32.

    return 0;
}
Exemple #3
0
void
octave_rl_set_name (const char *n)
{
  OCTAVE_RL_SAVE_STRING (nm, n);

  rl_readline_name = nm;

  /* Since we've already called rl_initialize, we need to re-read the
     init file to take advantage of the conditional parsing feature
     based on rl_readline_name; */

  rl_re_read_init_file (0, 0);
}
Exemple #4
0
void
octave_rl_re_read_init_file (void)
{
  rl_re_read_init_file (0, 0);
}