Bash + Screen prompt and title (Debian)


/ Published in: Bash
Save to your folder(s)

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


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.