Function: eshell-unescape-inner-double-quote
eshell-unescape-inner-double-quote is a byte-compiled function defined
in esh-arg.el.gz.
Signature
(eshell-unescape-inner-double-quote BOUND)
Documentation
Unescape escaped characters inside a double-quoted string.
The string to parse starts at point and ends at BOUND.
If Eshell is currently parsing a quoted string and there are any backslash-escaped characters, this will return the unescaped string, updating point to BOUND. Otherwise, this returns nil and leaves point where it was.
Source Code
;; Defined in /usr/src/emacs/lisp/eshell/esh-arg.el.gz
(defun eshell-unescape-inner-double-quote (bound)
"Unescape escaped characters inside a double-quoted string.
The string to parse starts at point and ends at BOUND.
If Eshell is currently parsing a quoted string and there are any
backslash-escaped characters, this will return the unescaped
string, updating point to BOUND. Otherwise, this returns nil and
leaves point where it was."
(when eshell-current-quoted
(let (strings
(start (point))
(special-char
(rx-to-string
`(seq "\\" (group (any ,@eshell-special-chars-inside-quoting))))))
(while (re-search-forward special-char bound t)
(push (concat (buffer-substring start (match-beginning 0))
(match-string 1))
strings)
(setq start (match-end 0)))
(when strings
(push (buffer-substring start bound) strings)
(goto-char bound)
(apply #'concat (nreverse strings))))))