🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by bothner Sat, 09 Sep 1989 00:39
Bash example for xterm users
#561
Author: bothner
Date: Sat, 09 Sep 1989 00:39
29 lines
1254 bytes
Xterm users may want to add something like the following to their
.bashrc. It sets the working directory and hostname in the title bar,
and writes the prompt with underlining.
Also, the function 'setname' changes the icon name, and the
prefix of the title bar.
Note that what may look like ^[ and ^G are <Escape> and <Bell>.
Brian, you are welcome to include this (or something similar)
in the examples directory.
	--Per

if [ "$PS1" ]; then

  # Set xterm "name" of terminal, and update icon name.
  function setname {
     TERMNAME="$*"
     if [ "$TERM" = "xterm" ]; then echo -n "]1;${TERMNAME}"; fi
  }

  if [ ! "$LOGIN_SHELL" ]; then
    if [ "$TERM" = "xterm" ]; then
      if [ ! "$TERMNAME" ]; then TERMNAME=xterm; fi
      # Set xterm title bar name.
      PS1=']2;${TERMNAME}: \w@\h[4m\h<\!>[0m'
    else
      PS1='\h:\w[\!] '
    fi
  fi

fi
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads