From: Richard M. Stallman Date: Mon, 2 Mar 1998 19:02:28 +0000 (+0000) Subject: (comint-arguments): Treat \" and such as part of one arg. X-Git-Tag: emacs-20.3~2056 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ec5691271b1d5675b9782dcb1090721ce6c43383;p=emacs.git (comint-arguments): Treat \" and such as part of one arg. --- diff --git a/lisp/comint.el b/lisp/comint.el index 102cd1ec8c7..6c44a551123 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -1126,7 +1126,15 @@ We assume whitespace separates arguments, except within quotes. Also, a run of one or more of a single character in `comint-delimiter-argument-list' is a separate argument. Argument 0 is the command name." - (let ((argpart "[^ \n\t\"'`]+\\|\\(\"[^\"]*\"\\|'[^']*'\\|`[^`]*`\\)") + ;; The first line handles ordinary characters and backslash-sequences. + ;; The second matches "-quoted strings. + ;; The third matches '-quoted strings. + ;; The fourth matches `-quoted strings. + ;; This seems to fit the syntax of BASH 2.0. + (let ((argpart "[^ \n\t\"'`\\]+\\|\\\\[\"'`\\]+\\|\ +\\(\"\\([^\"\\]\\|\\\\.\\)*\"\\|\ +'[^']*'\\|\ +`[^`]*`\\)") (args ()) (pos 0) (count 0) beg str value quotes)