fn do_tab_completion(cursor: usize, input: &str, word: &str) -> (String, usize)