Function: tramp-call-local-coding-command

tramp-call-local-coding-command is a byte-compiled function defined in tramp-sh.el.gz.

Signature

(tramp-call-local-coding-command CMD INPUT OUTPUT)

Documentation

Call the local encoding or decoding command.

If CMD contains "%s", provide input file INPUT there in command. Otherwise, INPUT is passed via standard input. INPUT can also be nil which means null-device(var)/null-device(fun). OUTPUT can be a string (which specifies a file name), or t (which means standard output and thus the current buffer), or nil (which means discard it).

Source Code

;; Defined in /usr/src/emacs/lisp/net/tramp-sh.el.gz
(defun tramp-call-local-coding-command (cmd input output)
  "Call the local encoding or decoding command.
If CMD contains \"%s\", provide input file INPUT there in command.
Otherwise, INPUT is passed via standard input.
INPUT can also be nil which means `null-device'.
OUTPUT can be a string (which specifies a file name), or t (which
means standard output and thus the current buffer), or nil (which
means discard it)."
  (tramp-call-process
   nil tramp-encoding-shell
   (when (and input (not (string-search "%s" cmd))) input)
   (if (eq output t) t nil)
   nil
   tramp-encoding-command-switch
   (concat
    (if (string-search "%s" cmd) (format cmd input) cmd)
    (if (stringp output) (concat " >" output) ""))))