Function: eshell-quote-argument
eshell-quote-argument is a byte-compiled function defined in
esh-arg.el.gz.
Signature
(eshell-quote-argument STRING)
Documentation
Return STRING with magic characters quoted.
Magic characters are those in eshell-special-chars-outside-quoting.
For consistent results, only call this function within an Eshell buffer.
Source Code
;; Defined in /usr/src/emacs/lisp/eshell/esh-arg.el.gz
(defun eshell-quote-argument (string)
"Return STRING with magic characters quoted.
Magic characters are those in `eshell-special-chars-outside-quoting'.
For consistent results, only call this function within an Eshell buffer."
(let ((index 0))
(mapconcat (lambda (c)
(prog1
(or (eshell-quote-backslash string index)
(char-to-string c))
(setq index (1+ index))))
string
"")))