Sensible Defaults
pgcli.com
pgcli.com
Even though I always reformat the query, and even though the text editor I use -- vim / neo-vim -- supports rectangular text selection, I would be annoyed at such dots.
Thank you for the feedback.
In VIM I make my whitespace visible, and just live with the consequences when I cut an paste. That said, I most of my empty spaces are still invisible, I only show tabs and trailing spaces.
Which, if the query is long (e.g. longer than 20+ lines) it's not gonna make any difference anyway -- it's not like it matters if you can fit e.g. 24 or 23 lines of a 30 line query (besides, the result rows are gonna take much more vertical space, further making the measly 1 extra line issue moot).
As for for multiple small queries (and one extra line after each of those prompts), you can always scroll. And, again, the results are gonna take far more vertical space than the single extra line per prompt.
And, of course, with the full horizontal space available (and not half wasted by dots) you get to fit more characters in each line, and thus your queries will probably end up using FEWER lines.
So, not only the extra line from the "newline after prompt" is no big deal vertical-space wise, but the dot scheme wastes MORE vertical space AND renders queries unpastable.
aaron@tesla ~ %
pwd
/home/aaron
aaron@tesla ~ %
cd Projects
aaron@tesla ~/Projects %
pwd
/home/aaron/Projects
aaron@tesla ~/Projects % PS1='\033]0;${PWD}\n\033[32m${USER}@${HOSTNAME} \033[33m${PWD/${HOME}/~}\033[0m\n# '
Looks like: root@myhost.name /etc/httpd/conf
# : stuff;
If you copy the entire line, stuff is arguments to the ‘:’ command, which does nothing. (This does mean stuff can't contain unmatched shell special characters.)I think this was invented in the Blit era by someone I've forgotten.
Also, I believe I first heard of pgcli from an HN comment, and since then I have been a daily user of it.
Expanded mode in psql is a way to output the results of a
query if the output is too wide to fit in the screen when
shown as a table. This can be toggled by \x on or \x off.
[...] In pgcli, we have the ability to do this but this is
not enabled by default. It has to be enabled via the config
file (~/.config/pgcli/config) by the user.
I don't think we'll change this behavior.
Why not? Seems quite sensible a thing to do when the output otherwise wouldn't fit.But you bring up a good point. I'm not mired by maintaining legacy, so I could take this as an opportunity to educate users about the \x auto by enabling it as default.
Do people here think the world would be a better place if installing something didn't require reading any documentation (not even 45 minutes of it) or necessarily spend any time making choices?
For example, if it were possible to requisition a new AWS instance and install a Ruby on Rails configuration with "sensible" defaults on it, in, say, < 30 seconds, and it being secure and properly configured so that a newbie without any experience can immediately deploy apps on it securely and without understanding the parts involved or making choices?
I can see arguments for both sides.
The floor in user capabilities is low.
https://www.reddit.com/r/dredmorbius/comments/69wk8y/the_tyr...
I was expecting this to be about web pages.
"Yes, of course I want to sign up for your "newsletter" offering me the latest deals every hour on the hour!" Click on the invisible x to opt out. (Very Facebook.)