# Use ":aperl reload" to reload .owlconf

sub reload_hook (@) {
    # Redefine this function in your .owlconf and include in it any
    # code you want to happen on a reload.  I suggest you create
    # load_filters() and run it from here and owl::startup()
    # because owl::command() must be in a sub
}

sub reload {
    if (do "$ENV{HOME}/.owlconf" && reload_hook(@_)) {
        return "owlconf reloaded";
    } else {
        return "owlconf load attempted, but error encountered:\n$@";
    }
}

sub reload_init () {
    owl::command('alias reload aperl reload');
    owl::command('bindkey global "C-x C-r" command reload');
}

1;
