@@ -32,6 +32,7 @@ void move_cursor(int, int);
3232void * initialise_clink_settings ();
3333int getc_impl (FILE * stream );
3434int get_clink_setting_int (const char * );
35+ void get_config_dir (char * , int );
3536void clink_register_rl_funcs ();
3637char * filter_prompt (const char * );
3738void * extract_prompt (int );
@@ -448,6 +449,15 @@ static void display_matches(char** matches, int match_count, int longest)
448449 free (new_matches );
449450}
450451
452+ //------------------------------------------------------------------------------
453+ static void read_profile_inputrc ()
454+ {
455+ char buffer [MAX_PATH ];
456+ get_config_dir (buffer , sizeof_array (buffer ));
457+ str_cat (buffer , "/clink_inputrc" , sizeof_array (buffer ));
458+ rl_read_init_file (buffer );
459+ }
460+
451461//------------------------------------------------------------------------------
452462static int initialise_hook ()
453463{
@@ -477,6 +487,8 @@ static int initialise_hook()
477487 initialise_rl_scroller ();
478488
479489 rl_re_read_init_file (0 , 0 );
490+ read_profile_inputrc ();
491+
480492 rl_visible_stats = 0 ; // serves no purpose under win32.
481493
482494 rl_startup_hook = NULL ;
0 commit comments