Hacker News new | ask | show | jobs
by a3n 3265 days 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 %
2 comments

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.

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
    #