Add option to set the prompt format
Closed this issue · 1 comments
All the query input is left aligned to the end of the prompt.
My prompt over 40 characters wide, or about half the width of the terminal.
eu-central-1:athenacurcfn_example_database>
This wastes a lot of space and causes more ugly wrapping for long names.
I don't need to see the region and the database name on every query. A minimal prompt such as >
is just fine.
Your cousin pgcli has a prompt option to control the format.
$ pgcli --help
Usage: pgcli [OPTIONS] [DBNAME] [USERNAME]
Options:
...
--prompt TEXT Prompt format (Default: "\u@\h:\d> ").
Could you copy this feature from pgcli?
I just checked the help
output inside the CLI and saw that the \R
option does almost what I want. It sets the prompt to >
but doesn't put a space after the arrow.
\R >
And I can use the --athenaclirc
option to set the prompt exactly to >
.
cat > /tmp/athenaclirc <<"EOF"
[main]
prompt = '> '
EOF
athenacli \
--athenaclirc /tmp/athenaclirc \
dbname
This is actually a good enough solution for me, so I'll close the issue. Thanks!