fisher/functions/__fisher_key_bindings_disable.fish
2016-02-20 09:57:51 +09:00

19 lines
541 B
Fish

function __fisher_key_bindings_disable -a plugin user_key_bindings
fish_indent < $fisher_binds \
| __fisher_key_bindings_undo $plugin \
| source
__fisher_key_bindings_delete $plugin \
> $fisher_binds.tmp \
< $fisher_binds
command mv -f $fisher_binds.tmp $fisher_binds
if test ! -s $fisher_binds
debug "Remove fisherman key bindings '%s'" "$user_key_bindings"
sed -i.tmp '/__fisher_key_bindings/d' $user_key_bindings
command rm -f $user_key_bindings.tmp
end
end