fix fish completions with words containing -f

This commit is contained in:
Azhar Madar Shaik 2025-08-16 15:32:36 +05:30
parent c9ebc97808
commit 96cecb5e82

View file

@ -94,10 +94,10 @@ export extern "just" [
]"#;
const FISH_RECIPE_COMPLETIONS: &str = r#"function __fish_just_complete_recipes
if string match -rq '(-f|--justfile)\s*=?(?<justfile>[^\s]+)' -- (string split -- ' -- ' (commandline -pc))[1]
set -fx JUST_JUSTFILE "$justfile"
end
printf "%s\n" (string split " " (just --summary))
if string match -rq '\s(-f|--justfile)\s*=?(?<justfile>[^\s]+)' -- (string split -- ' -- ' (commandline -pc))[1]
set -fx JUST_JUSTFILE "$justfile"
end
printf "%s\n" (string split " " (just --summary))
end
# don't suggest files right off