From d428b723c8c18fef3b2a00b8b8b731177f483ad8 Mon Sep 17 00:00:00 2001 From: Pablo Santiago Blum de Aguiar Date: Mon, 5 Apr 2021 19:23:23 +0200 Subject: [PATCH] omf.cli.install: Set theme when installed from URL Co-authored-by: Fabian Homborg --- pkg/omf/functions/cli/omf.cli.install.fish | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/omf/functions/cli/omf.cli.install.fish b/pkg/omf/functions/cli/omf.cli.install.fish index c1aa5d7..4bdbe4e 100644 --- a/pkg/omf/functions/cli/omf.cli.install.fish +++ b/pkg/omf/functions/cli/omf.cli.install.fish @@ -14,8 +14,11 @@ function omf.cli.install and require $package # If package is a theme, set it to active. - if contains -- $package (omf.packages.list --theme) + set -l themes (omf.packages.list --theme) + if contains -- $package $themes omf.theme.set $package + else if set -l ind (contains -i -- (omf.packages.name $package) $themes) + omf.theme.set $themes[$ind] end test $status != 0;