
___x_cmd_bootrc_run(){
    [ -d "$___X_CMD_ROOT/bootrc" ] || return 0
    local i
    for i in "$___X_CMD_ROOT/bootrc"/*; do
        [ -f "$i" ] || return 0
        . "$i"
    done
}

{
    ___X_CMD_RUNMODE="${___X_CMD_RUNMODE:-"$___X_CMD_RUNMODE_CHATTY"}"

    xrc:mod:lib     x-cmd  replhook/index

    # Adding theme boot code here ...
    xrc:mod theme/lib/boot/theme.load

    if ___x_cmd_is_suitable_advise_repl; then
        # command -v ___x_cmd_advise >/dev/null || xrc advise
        xrc:mod advise/latest       # Repalce xrc advise
    fi

    xrc:mod boot/latest
    ___x_cmd_boot_rc  load
    ___x_cmd_boot_mod load

    # introduce alias
    if [ -z "$ZSH_VERSION" ]; then
        alias "+=___x_cmd_xrc_import"
    else
        alias -- +=___x_cmd_xrc_import

        trap '
        case "$0" in
            zsh)            return 130 ;;
            -zsh)           return 130 ;;
            _zsh*)          return 130 ;;
            */zsh)          return 130 ;;
            */zsh.exe)      return 130 ;;
            ___x_cmd_readr) return 130 ;;
        esac
        ' INT              # Experimental, change the zsh default behavior.
    fi

    ! ___x_cmd_is_ish || { alias m='___x_cmd ish'; }

    xrc:mod xrc/lib/rcshortcut

    ___x_cmd_bootrc_run
}
