Function: eshell-quote-backslash
eshell-quote-backslash is a byte-compiled function defined in
esh-arg.el.gz.
Signature
(eshell-quote-backslash STRING &optional INDEX)
Documentation
Intelligently backslash the character occurring in STRING at INDEX.
If the character is itself a backslash, it needs no escaping. If the character is a newline, quote it using single-quotes.
Source Code
;; Defined in /usr/src/emacs/lisp/eshell/esh-arg.el.gz
(defun eshell-quote-backslash (string &optional index)
"Intelligently backslash the character occurring in STRING at INDEX.
If the character is itself a backslash, it needs no escaping. If the
character is a newline, quote it using single-quotes."
(let ((char (aref string index)))
(cond ((eq char ?\\)
(char-to-string char))
((eq char ?\n)
"'\n'")
((memq char eshell-special-chars-outside-quoting)
(string ?\\ char)))))