mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-26 10:49:33 +00:00
(comint-arguments): Treat \" and such as part of one arg.
This commit is contained in:
parent
2132370622
commit
ec5691271b
@ -1126,7 +1126,15 @@ We assume whitespace separates arguments, except within quotes.
|
|||||||
Also, a run of one or more of a single character
|
Also, a run of one or more of a single character
|
||||||
in `comint-delimiter-argument-list' is a separate argument.
|
in `comint-delimiter-argument-list' is a separate argument.
|
||||||
Argument 0 is the command name."
|
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)
|
(args ()) (pos 0)
|
||||||
(count 0)
|
(count 0)
|
||||||
beg str value quotes)
|
beg str value quotes)
|
||||||
|
Loading…
Reference in New Issue
Block a user