Autocomplete is now case insensitive
This commit is contained in:
parent
26182f3b4d
commit
40a61e7e68
@ -149,7 +149,7 @@ fn autocomplete_file(search: &Search) -> std::io::Result<(String, String)> {
|
|||||||
.unwrap()
|
.unwrap()
|
||||||
.to_str()
|
.to_str()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
let re = format!("^{}.*$", search.searchee);
|
let re = format!("(?i)^{}.*$", search.searchee);
|
||||||
let regex = Regex::new(&re).unwrap();
|
let regex = Regex::new(&re).unwrap();
|
||||||
if regex.is_match(filename) {
|
if regex.is_match(filename) {
|
||||||
if search.local_search {
|
if search.local_search {
|
||||||
@ -250,7 +250,7 @@ fn autocomplete_cmd(input: &String, search: &Search) -> (String, String) {
|
|||||||
///Takes a string and returns a Vector of PathBuf containing all matchings
|
///Takes a string and returns a Vector of PathBuf containing all matchings
|
||||||
///commands
|
///commands
|
||||||
fn find_bin(command: &String) -> Vec<PathBuf> {
|
fn find_bin(command: &String) -> Vec<PathBuf> {
|
||||||
let re = format!("^{}.*", command);
|
let re = format!("(?i)^{}.*", command);
|
||||||
let re = Regex::new(&re).unwrap();
|
let re = Regex::new(&re).unwrap();
|
||||||
let mut binaries: Vec<PathBuf> = which_re(re).unwrap().collect();
|
let mut binaries: Vec<PathBuf> = which_re(re).unwrap().collect();
|
||||||
binaries.sort();
|
binaries.sort();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user