top | item 14794570

(no title)

eriknstr | 8 years 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.

discuss

order

a3n|8 years ago

Don'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 %

kps|8 years ago

This 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.

teh_klev|8 years ago

I 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
    #

amjith|8 years ago

That'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|8 years ago

Empty space would be the better default I think yes.

blattimwind|8 years ago

The 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.

spion|8 years ago

Or 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.

adrianratnapala|8 years ago

While 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.

peteretep|8 years ago

Don't want to pile on, but yes to empty spaces

tejasmanohar|8 years ago

The dots are my biggest gripe about pgcli. That would be an awesome change!