From f44abdf024a46c217a61e54bbbab60074560d304 Mon Sep 17 00:00:00 2001 From: Bojan Stipic Date: Sun, 18 Jun 2023 02:05:49 +0200 Subject: [PATCH] Avoid grep aliases in bash completions (#1622) --- completions/just.bash | 2 +- src/completions.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/completions/just.bash b/completions/just.bash index eb84e3e..9c7945b 100644 --- a/completions/just.bash +++ b/completions/just.bash @@ -27,7 +27,7 @@ _just() { elif [[ ${COMP_CWORD} -eq 1 ]]; then local recipes=$(just --summary 2> /dev/null) - if echo "${cur}" | grep -qF '/'; then + if echo "${cur}" | \grep -qF '/'; then local path_prefix=$(echo "${cur}" | sed 's/[/][^/]*$/\//') local recipes=$(just --summary 2> /dev/null -- "${path_prefix}") local recipes=$(printf "${path_prefix}%s\t" $recipes) diff --git a/src/completions.rs b/src/completions.rs index f1eeea6..696f57c 100644 --- a/src/completions.rs +++ b/src/completions.rs @@ -168,7 +168,7 @@ pub(crate) const BASH_COMPLETION_REPLACEMENTS: &[(&str, &str)] = &[ elif [[ ${COMP_CWORD} -eq 1 ]]; then local recipes=$(just --summary 2> /dev/null) - if echo "${cur}" | grep -qF '/'; then + if echo "${cur}" | \grep -qF '/'; then local path_prefix=$(echo "${cur}" | sed 's/[/][^/]*$/\//') local recipes=$(just --summary 2> /dev/null -- "${path_prefix}") local recipes=$(printf "${path_prefix}%s\t" $recipes)