From 19c887fded1c16141d7cef3fc030da5bc08d191a Mon Sep 17 00:00:00 2001 From: Patrick Jackson Date: Mon, 12 Jun 2023 10:12:17 -0700 Subject: [PATCH] Add descriptions to fish recipe completions (#1578) --- completions/just.fish | 2 +- src/completions.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/completions/just.fish b/completions/just.fish index ebf8eeb..43d4177 100644 --- a/completions/just.fish +++ b/completions/just.fish @@ -1,5 +1,5 @@ function __fish_just_complete_recipes - just --summary 2> /dev/null | tr " " "\n" || echo "" + just --list 2> /dev/null | sed -e '1d; s/^\s*\([^[:space:]]*\)[^#]*$/\1/' -e 's/^\s*\([^[:space:]]*\)[^#]*# \(.*\)$/\1\t\2/' end # don't suggest files right off diff --git a/src/completions.rs b/src/completions.rs index 2897ceb..f1eeea6 100644 --- a/src/completions.rs +++ b/src/completions.rs @@ -1,5 +1,5 @@ pub(crate) const FISH_RECIPE_COMPLETIONS: &str = r#"function __fish_just_complete_recipes - just --summary 2> /dev/null | tr " " "\n" || echo "" + just --list 2> /dev/null | sed -e '1d; s/^\s*\([^[:space:]]*\)[^#]*$/\1/' -e 's/^\s*\([^[:space:]]*\)[^#]*# \(.*\)$/\1\t\2/' end # don't suggest files right off