diff --git a/completions/just.fish b/completions/just.fish index 63ab67e49b..7aedd4a81d 100644 --- a/completions/just.fish +++ b/completions/just.fish @@ -8,20 +8,20 @@ function __fish_just_complete_recipes gsub(/^[[:space:]]+|[[:space:]]+$/, "", args); if (match(args, /#.*/)) { - desc = substr(args, RSTART+2, RLENGTH) - args = substr(args, 0, RSTART-1) + desc = substr(args, RSTART+2, RLENGTH); + args = substr(args, 0, RSTART-1); gsub(/^[[:space:]]+|[[:space:]]+$/, "", args); } - gsub(/\+|=[`\'"][^`\'"]*[`\'"]/, "", args) - gsub(/ /, ",", args) + gsub(/\+|=[`\'"][^`\'"]*[`\'"]/, "", args); + gsub(/ /, ",", args); if (args != ""){ - args = "Args: " args + args = "Args: " args; } if (args != "" && desc != "") { - delim = "; " + delim = "; "; } print command "\t" args delim desc diff --git a/src/completions.rs b/src/completions.rs index ca18d0d7f6..36999ee88e 100644 --- a/src/completions.rs +++ b/src/completions.rs @@ -8,20 +8,20 @@ pub(crate) const FISH_RECIPE_COMPLETIONS: &str = r#"function __fish_just_complet gsub(/^[[:space:]]+|[[:space:]]+$/, "", args); if (match(args, /#.*/)) { - desc = substr(args, RSTART+2, RLENGTH) - args = substr(args, 0, RSTART-1) + desc = substr(args, RSTART+2, RLENGTH); + args = substr(args, 0, RSTART-1); gsub(/^[[:space:]]+|[[:space:]]+$/, "", args); } - gsub(/\+|=[`\'"][^`\'"]*[`\'"]/, "", args) - gsub(/ /, ",", args) + gsub(/\+|=[`\'"][^`\'"]*[`\'"]/, "", args); + gsub(/ /, ",", args); if (args != ""){ - args = "Args: " args + args = "Args: " args; } if (args != "" && desc != "") { - delim = "; " + delim = "; "; } print command "\t" args delim desc