diff options
Diffstat (limited to 'builtin.cpp')
-rw-r--r-- | builtin.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/builtin.cpp b/builtin.cpp index 3897e899..e2374f1d 100644 --- a/builtin.cpp +++ b/builtin.cpp @@ -2184,7 +2184,7 @@ static int builtin_read( parser_t &parser, 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 ); } @@ -3885,6 +3885,18 @@ 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; + + if (builtin.arr[i].key == 0) + continue; + + data_to_push.completion = (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 ); |