<%-* if ( tp.frontmatter.current_port == undefined) { tp.frontmatter.current_port = await tp.system.prompt('Enter port number: ') } -%>
<%*
let different_port = ""
if (parseInt(tp.frontmatter.current_port) != 5432) {
different_port = --port=${tp.frontmatter.current_port}
}
-%>
psql -h <% tp.frontmatter.target_ip %> -U <user> -W <% different_port %>
Try without password
psql -h <% tp.frontmatter.target_ip %> -U <user> -w <% different_port %>