diff --git a/completions/just.fish b/completions/just.fish index 0771de0135..086f513913 100644 --- a/completions/just.fish +++ b/completions/just.fish @@ -1,5 +1,5 @@ function __fish_just_complete_recipes - just --list 2> /dev/null | sed -e '1d; s/^\s*\([^[:space:]]*\)[^#]*$/\1/' -e 's/^\s*\([^[:space:]]*\)[^#]*# \(.*\)$/\1\t\2/' + just --list 2> /dev/null | sed -E -e '1d; s/^[[:space:]]*([^[:space:]]+)[[:space:]]*#[[:space:]]*(.*)$/\1\t\2/' -e 's/^[[:space:]]*([^[:space:]]+)[[:space:]]*$/\1/' end # don't suggest files right off diff --git a/src/completions.rs b/src/completions.rs index 3d805ff045..77cf19cd38 100644 --- a/src/completions.rs +++ b/src/completions.rs @@ -1,5 +1,5 @@ pub(crate) const FISH_RECIPE_COMPLETIONS: &str = r#"function __fish_just_complete_recipes - just --list 2> /dev/null | sed -e '1d; s/^\s*\([^[:space:]]*\)[^#]*$/\1/' -e 's/^\s*\([^[:space:]]*\)[^#]*# \(.*\)$/\1\t\2/' + just --list 2> /dev/null | sed -E -e '1d; s/^[[:space:]]*([^[:space:]]+)[[:space:]]*#[[:space:]]*(.*)$/\1\t\2/' -e 's/^[[:space:]]*([^[:space:]]+)[[:space:]]*$/\1/' end # don't suggest files right off