Function: tramp-ssh-setenv-term

tramp-ssh-setenv-term is a byte-compiled function defined in tramp-sh.el.gz.

Signature

(tramp-ssh-setenv-term VEC)

Documentation

Return the "-o Setenv=TERM=dumb" option of the local ssh if possible.

Source Code

;; Defined in /usr/src/emacs/lisp/net/tramp-sh.el.gz
(defun tramp-ssh-setenv-term (vec)
  "Return the \"-o Setenv=TERM=dumb\" option of the local ssh if possible."
  (cond
   ;; No options to be computed.
   ((null (assoc "%w" (tramp-get-method-parameter vec 'tramp-login-args)))
    "")

   ;; There is already a value to be used.
   ((stringp tramp-ssh-setenv-term)
    tramp-ssh-setenv-term)

   ;; Determine the option.
   (t (setq tramp-ssh-setenv-term
            (if (tramp-ssh-option-exists-p
                 vec (format "SetEnv=\"TERM=%s\"" tramp-terminal-type))
                (format " -o SetEnv=\"TERM=%s\"" tramp-terminal-type)
              "")))))