Avoid grep aliases in bash completions (#1622)
This commit is contained in:
parent
c2cfdd7a9c
commit
f44abdf024
@ -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)
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user