# shellcheck shell=dash

# I introduce a concept named hop here ...
___x_cmd_wkp_hop(){
    local query="$*"
    local result1; local tmp

    result1="$(___x_cmd_wkp_search --json "$query" | ___x_cmd jo .1.title )"

    # TODO: fetch how many results
    wkp:info "Leap of faith -> $result1"

    [ -n "$result1" ] || return
    tmp="${result1#\"*}"
    result1="${tmp%*\"}"
    # using the first result

    ___x_cmd_wkp extract "$result1"
}


