From 34cc2b39763c8a92fa0e2ad4f68f067fad4b09c1 Mon Sep 17 00:00:00 2001 From: pagedmov Date: Tue, 11 Mar 2025 16:10:59 -0400 Subject: [PATCH] Committing now before huge refactor based on inspiration from the fish codebase --- src/expand/brace.rs | 2 +- src/filewithareallyreallyreallyreallylongname.txt | 1 + src/prompt/comp.rs | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 src/filewithareallyreallyreallyreallylongname.txt diff --git a/src/expand/brace.rs b/src/expand/brace.rs index 4a08187..9de4c45 100644 --- a/src/expand/brace.rs +++ b/src/expand/brace.rs @@ -108,7 +108,7 @@ fn expand_range(range: &str) -> Vec { if let Some((left,right)) = range.split_once("..") { // I know, I know // This is checking to see if the range looks like "a..b" or "A..B" - // one character on both sides, both are letters, and both are uppercase OR both are lowercase + // one character on both sides, both are letters, AND (both are uppercase OR both are lowercase) if (left.len() == 1 && right.len() == 1) && (left.chars().all(|ch| ch.is_ascii_alphanumeric() && right.chars().all(|ch| ch.is_ascii_alphanumeric()))) && ( diff --git a/src/filewithareallyreallyreallyreallylongname.txt b/src/filewithareallyreallyreallyreallylongname.txt new file mode 100644 index 0000000..257cc56 --- /dev/null +++ b/src/filewithareallyreallyreallyreallylongname.txt @@ -0,0 +1 @@ +foo diff --git a/src/prompt/comp.rs b/src/prompt/comp.rs index 1b22e3e..a80f208 100644 --- a/src/prompt/comp.rs +++ b/src/prompt/comp.rs @@ -52,7 +52,7 @@ impl<'a> Completer for SynHelper<'a> { if let Some(selection) = fzf_comp(&comps, &mut shenv) { return Ok((start, vec![selection])) } else { - return Ok((start, comps)) + return Ok((start, vec![])) } } else { return Ok((start, comps))