Avoid grep aliases in bash completions (#1622)

This commit is contained in:
Bojan Stipic 2023-06-18 02:05:49 +02:00 committed by GitHub
parent c2cfdd7a9c
commit f44abdf024
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@ _just() {
elif [[ ${COMP_CWORD} -eq 1 ]]; then elif [[ ${COMP_CWORD} -eq 1 ]]; then
local recipes=$(just --summary 2> /dev/null) 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 path_prefix=$(echo "${cur}" | sed 's/[/][^/]*$/\//')
local recipes=$(just --summary 2> /dev/null -- "${path_prefix}") local recipes=$(just --summary 2> /dev/null -- "${path_prefix}")
local recipes=$(printf "${path_prefix}%s\t" $recipes) local recipes=$(printf "${path_prefix}%s\t" $recipes)

View File

@ -168,7 +168,7 @@ pub(crate) const BASH_COMPLETION_REPLACEMENTS: &[(&str, &str)] = &[
elif [[ ${COMP_CWORD} -eq 1 ]]; then elif [[ ${COMP_CWORD} -eq 1 ]]; then
local recipes=$(just --summary 2> /dev/null) 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 path_prefix=$(echo "${cur}" | sed 's/[/][^/]*$/\//')
local recipes=$(just --summary 2> /dev/null -- "${path_prefix}") local recipes=$(just --summary 2> /dev/null -- "${path_prefix}")
local recipes=$(printf "${path_prefix}%s\t" $recipes) local recipes=$(printf "${path_prefix}%s\t" $recipes)