Skip to content

Commit

Permalink
fish_completions: make regex macos and linux friendly
Browse files Browse the repository at this point in the history
  • Loading branch information
l4zygreed committed Oct 25, 2023
1 parent e01dbda commit fac6c66
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion completions/just.fish
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/completions.rs
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit fac6c66

Please sign in to comment.