From 1c084beb43376cb4a475bc9a5e4da0ad1d93614b Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Sun, 18 Dec 2022 09:39:36 +0100 Subject: [PATCH] completions/abbr: offer functions only if --function is given --- share/completions/abbr.fish | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/completions/abbr.fish b/share/completions/abbr.fish index 6aafdd261..d5cf267da 100644 --- a/share/completions/abbr.fish +++ b/share/completions/abbr.fish @@ -2,9 +2,10 @@ set __fish_abbr_not_add_cond '__fish_seen_subcommand_from --query --rename --erase --show --list --help' set __fish_abbr_add_cond 'not __fish_seen_subcommand_from --query --rename --erase --show --list --help' function __fish_abbr_add_function_cond - argparse -s h/help a/add p/position= f/function r/regex= 'set-cursor=?' \ + argparse h/help a/add p/position= f/function r/regex= 'set-cursor=?' \ -- (commandline -opc)[2..-1] 2>/dev/null and test (count $argv) -eq 1 + and set -q _flag_f end complete -c abbr -f