build_prompt() { if (( table )); then printf '%s:%d[%d]> ' "$host" "$port" "$table" else printf '%s:%d> ' "$host" "$port" fi }