4 ms·
Filling the indent area with dots is not a sensible default IMO. Often when I work on a query I am going to reuse it in an application. If PgAdmin III or psql f
by eriknstr 9y ago
Filling the indent area with dots is not a sensible default IMO. Often when I work on a query I am going to reuse it in an application. If PgAdmin III or psql filled the indent area with dots then they would be included when I copied the query I'd written.
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.
- amjith 9y agoThat's good to know. Perhaps I should replace the dots with empty space. I'll do that if we get more requests for it. Thank you for the feedback.
- eriknstr 9y agoEmpty space would be the better default I think yes.
- OriginalPenguin 9y agoDefinitely empty space!
- s_kilk 9y agoSame, dots are obnoxious when copy-pasting.
- blattimwind 9y agoThe Python REPL notoriously uses >>>/... like in the screenshot, ẃith the effect that e.g. IPython has a special paste-from-repl magic just to remove these.
- tejasmanohar 9y agoThe dots are my biggest gripe about pgcli. That would be an awesome change!
- amjith 9y agoYou can change this to an empty space via the config file right now. In ~/.config/pgcli/config look for continuation prompt and set it to empty string.
- peteretep 9y agoDon't want to pile on, but yes to empty spaces
- adrianratnapala 9y agoWhile you are data gathering, I will half-vote the other way. 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.
- coldtea 9y agoWell, an editor should not copy whitespace visibility characters in the first place.
- spion 9y agoOr alternatively the prompt character could start on a new line. That way you can have smaller windows fit more query per line with less space wasted on white-space.
- eriknstr 9y agoBut in return you might use more vertical space, and with a terminal size of 80x24, vertical space is more precious.
- coldtea 9y agoWith the "newline after prompt" scheme, you only get one extra line per query. 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.
- deleted 9y ago[deleted]
- a3n 9y agoDon't fill it with dots, use it. This is my shell prompt. I break after the '%', so that long commands use as much of a line as possible, and I break before the prompt, because I like to visibly separate operations. aaron@tesla ~ % pwd /home/aaron aaron@tesla ~ % cd Projects aaron@tesla ~/Projects % pwd /home/aaron/Projects aaron@tesla ~/Projects %
- teh_klev 9y agoI do something similar which is based on the Cygwin default bash prompt: PS1='\033]0;${PWD}\n\033[32m${USER}@${HOSTNAME} \033[33m${PWD/${HOME}/~}\033[0m\n# ' Looks like: root@myhost.name /etc/httpd/conf #
- kps 9y agoThis is what my shell prompt looks like: : 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.