From 0b0e65a8a4a3a74880085efc25453191cb7fa786 Mon Sep 17 00:00:00 2001 From: Wilke Schwiedop Date: Thu, 19 Apr 2018 21:41:25 +0200 Subject: [PATCH] Update ebuild.fish greatly simplify __fish_seen_ebuild_arg --- share/completions/ebuild.fish | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/share/completions/ebuild.fish b/share/completions/ebuild.fish index d09d1d2a8..4ef230e8f 100644 --- a/share/completions/ebuild.fish +++ b/share/completions/ebuild.fish @@ -1,13 +1,5 @@ function __fish_seen_ebuild_arg -d "Test if an ebuild-argument has been given in the current commandline" - set -l cmd (commandline -poc) - set -e cmd[1] - for i in $cmd - switch $i - case '*.ebuild' - return 0 - end - end - return 1 + commandline -opc | string match -q '*.ebuild' end ## Opts