Posted By

ChloeD on 06/03/11


Bash screen debian prompt sysadmin Development

Versions (?)

Bash + Screen prompt and title (Debian)

 / Published in: Bash

This .bashrc snippet sets the PS1 prompt so the title will be displayed in screen's statusbar.

  1. # STY is set by screen
  2. if [ -n "$STY" ]; then
  3. PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ \[\033k\]$(basename "\w")\[\033\\\]'
  4. else
  5. PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
  6. fi

Report this snippet  

You need to login to post a comment.