Merge pull request #355 from oh-my-fish/fix-double-key-bindings-load

Fix double key bindings load
This commit is contained in:
Derek Willian Stavis 2016-07-05 11:17:25 -03:00 committed by GitHub
commit da36946eca

View File

@ -23,9 +23,11 @@ require --path {$OMF_PATH,$OMF_CONFIG}/pkg/*
emit perf:timer:finish "Oh My Fish init installed packages" emit perf:timer:finish "Oh My Fish init installed packages"
# Backup key bindings # Backup key bindings
functions -q fish_user_key_bindings functions -q fish_user_key_bindings
and not functions -q __original_fish_user_key_bindings
and functions -c fish_user_key_bindings __original_fish_user_key_bindings and functions -c fish_user_key_bindings __original_fish_user_key_bindings
# Override key bindings, calling original if existent # Override key bindings, calling original if existent
function fish_user_key_bindings -V theme function fish_user_key_bindings
read -l theme < $OMF_CONFIG/theme
# Prepare packages key bindings paths # Prepare packages key bindings paths
set -l key_bindings $OMF_CONFIG/key_binding?.fish \ set -l key_bindings $OMF_CONFIG/key_binding?.fish \
{$OMF_CONFIG,$OMF_PATH}/pkg/*/key_bindings.fish \ {$OMF_CONFIG,$OMF_PATH}/pkg/*/key_bindings.fish \