mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-30 11:21:15 -03:00
Converted all auto completion calls (on pressing tab) to use std::vector<completion_t>, bugs are yet to be fixed
This commit is contained in:
@@ -2192,7 +2192,7 @@ static int builtin_read( wchar_t **argv )
|
||||
reader_set_prompt( prompt );
|
||||
if( shell )
|
||||
{
|
||||
reader_set_complete_function( &complete );
|
||||
reader_set_complete_function( &complete2 );
|
||||
reader_set_highlight_function( &highlight_shell );
|
||||
reader_set_test_function( &reader_shell_test );
|
||||
}
|
||||
@@ -3893,6 +3893,13 @@ void builtin_get_names( array_list_t *list )
|
||||
hash_get_keys( &builtin, list );
|
||||
}
|
||||
|
||||
void builtin_get_names2(std::vector<completion_t> &list) {
|
||||
for (int i=0;i<builtin.size; ++i) {
|
||||
completion_t data_to_push = { (wchar_t*)builtin.arr[i].key };
|
||||
list.push_back( data_to_push );
|
||||
}
|
||||
}
|
||||
|
||||
const wchar_t *builtin_get_desc( const wchar_t *b )
|
||||
{
|
||||
CHECK( b, 0 );
|
||||
|
||||
Reference in New Issue
Block a user