[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Set PS1 on login?

From: Michael Albinus
Subject: Re: Set PS1 on login?
Date: Tue, 12 Jun 2018 11:14:32 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

yary <address@hidden> writes:

> can pass information in the TERM environment variable, which is
> always copied (there may be a length limit however). You'll still have
> to make sure that the remote shell doesn't restrict the TERM variable
> to designate a known terminal type. Pass the -t option to ssh if
> you're not starting a remote interactive shell.
> env TERM="extra information:$TERM" ssh -t 
> 'MYVAR=${TERM%:*}; TERM=${TERM##*:}; export MYVAR; mycommand'

Why shall one do this? Tramp sets the remote TERM environment variable
to "dumb", so you could check it.

If you dislike this value, set variable `tramp-terminal-type' to
whatever you want, at your own risk.

--8<---------------cut here---------------start------------->8---
(let ((tramp-terminal-type "whatever")
      (default-directory "/ssh::"))
  (shell-command-to-string "echo $TERM"))
--8<---------------cut here---------------end--------------->8---

> -y

Best regards, Michael.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]