GNU bug report logs -
#31605
25.3; tramp-terminal-type too obscure
Previous Next
Reported by: Eli Barzilay <eli <at> barzilay.org>
Date: Sat, 26 May 2018 22:16:01 UTC
Severity: minor
Found in version 25.3
Fixed in version 26.2
Done: Michael Albinus <michael.albinus <at> gmx.de>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Wed, 30 May 2018 09:02:52 +0200
with message-id <874lip1v8j.fsf <at> gmx.de>
and subject line Re: bug#31605: 25.3; tramp-terminal-type too obscure
has caused the debbugs.gnu.org bug report #31605,
regarding 25.3; tramp-terminal-type too obscure
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
31605: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=31605
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
This is mostly a documentation issue for tramp's info file. The
problem is that `tramp-terminal-type` is described almost as an
afterthought in a section that talks about `tset` of all things...
It would be good to describe it better, and also mention it in the
section about zsh, since it's probably a very common problem there
with sophisticated prompts.
----
The thing is that the usual recommendation (included in the info too)
is:
[ $TERM = "dumb" ] && unsetopt zle && PS1='$ '
For *years* I have not used tramp because I couldn't find a way to
make things work. I ran into the zsh problem and coudln't find a
simple way that makes things just work: the above suffers from
affecting *all* dumb terminals, including running a shell inside of
Emacs too -- and while I don't use a right-prompt in Emacs, I don't
want to give up my useful prompt in the environment I most frequently
run my shells in! It finally dawned on me that instead of doing the
above, I can hack tramp: find whatever function runs the command and
advice it somehow to see a different TERM setting -- but as I was
looking into doing that, I was surprised to find that
`tramp-terminal-type` already exists! Using it, a much better
solution is to (setq tramp-terminal-type "tramp"), and in my .zshrc:
[[ $TERM == "tramp" ]] && unsetopt zle && PS1='$ ' && return
(Side note: since it's in zsh, it's better to use [[...]], and also
the wiki suggestion adding a `return` is useful since `.zshrc` is
intended for interactive configuration.)
In fact, I'd argue that the *default* value is better set as "tramp".
"dumb" is very overuse to provide some kind of interactivity that
tramp doesn't need anyway, so having a terminfo-unknown name like
"tramp" could only improve things for tramp uses. But that will
likely break too many existing configurations (like ones that do the
above recommended zsh hack...), so maybe recommend it instead.
--
((x=>x(x))(x=>x(x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!
[Message part 3 (message/rfc822, inline)]
Version: 26.2
Eli Barzilay <eli <at> barzilay.org> writes:
Hi Eli,
> Thanks! Minor tweak:
>
> If you want to use another value for ‘TERM’, change
> ‘tramp-terminal-type’ and this line accordingly.
> ^^^^^^^^^^^^^
Thanks, I've updated it. Closing the bug.
Best regards, Michael.
This bug report was last modified 7 years and 35 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.