Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Differrent prompt for remote machines



I want to solve the following problem:

  I'm often logged in to different machines that all share the
  same zsh configuration files (via ssh or telnet).  But I
  frequently forget on which machine I am, mainly because either
  I have the machine name in my promt for all machines or for no
  machine at all.  What I'd like to have is this:

    For the machine at which I logged in:

      <username> ...

    and

      <username>@<machine> ...

    for remote logins (and possibly the machine name in bright
    red for our server and in a different colour for other remote
    machines).

  Basically it breaks down to detecting if the shell runs on a
  local terminal or through a network connection.

Bye

Dominik ^_^  ^_^

--
Dominik Vogt, email: d.vogt@xxxxxxxxxxx
LifeBits Aktiengesellschaft, Albrechtstr. 9, D-72072 Tuebingen
fon: ++49 (0) 7071/7965-0, fax: ++49 (0) 7071/7965-20



Messages sorted by: Reverse Date, Date, Thread, Author