From fcc9d4dc0a8ef148a9ae8c30d672032398b374ed Mon Sep 17 00:00:00 2001 From: Derek Willian Stavis Date: Sat, 23 Jul 2016 20:49:42 -0300 Subject: [PATCH] key bindings: test if reload function is available (#368) This fixes a rare case when fish's builtin function __fish_reload_key_bindings is not defined. --- pkg/omf/functions/themes/omf.theme.set.fish | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/omf/functions/themes/omf.theme.set.fish b/pkg/omf/functions/themes/omf.theme.set.fish index 0d66dcc..f12e6d8 100644 --- a/pkg/omf/functions/themes/omf.theme.set.fish +++ b/pkg/omf/functions/themes/omf.theme.set.fish @@ -30,8 +30,9 @@ function omf.theme.set -a target_theme end end - # If key bindings file found, reload fish key bindings - test (count {$OMF_CONFIG,$OMF_PATH}/key_binding?.fish) -gt 0 + # Reload fish key bindings if reload is available and needed + functions -q __fish_reload_key_bindings + and test (count {$OMF_CONFIG,$OMF_PATH}/key_binding?.fish) -gt 0 and __fish_reload_key_bindings # Persist the changes