Function: tramp-plink-option-exists-p
tramp-plink-option-exists-p is a byte-compiled function defined in
tramp-sh.el.gz.
Signature
(tramp-plink-option-exists-p VEC OPTION)
Documentation
Check, whether local plink OPTION is applicable.
Source Code
;; Defined in /usr/src/emacs/lisp/net/tramp-sh.el.gz
(defun tramp-plink-option-exists-p (vec option)
"Check, whether local plink OPTION is applicable."
;; We don't want to cache it persistently.
(with-tramp-connection-property nil option
;; "plink" with valid options returns "plink: no valid host name
;; provided". We xcheck for this error message."
(with-temp-buffer
(tramp-call-process vec "plink" nil t nil option)
(not
(string-match-p
(rx (| (: "plink: unknown option \"" (literal option) "\"" )
(: "plink: option \"" (literal option)
"\" not available in this tool" )))
(buffer-string))))))