[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/bash-completion a79137cc86 004/313: escaped quotes
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/bash-completion a79137cc86 004/313: escaped quotes |
Date: |
Sat, 3 Dec 2022 10:58:59 -0500 (EST) |
branch: elpa/bash-completion
commit a79137cc8690c9ce1379e2690ade76556bbf489b
Author: Stephane Zermatten <szermatt@gmx.net>
Commit: Stephane Zermatten <szermatt@gmx.net>
escaped quotes
---
bash-complete.el | 7 +++----
bash-complete_test.el | 12 ++++++++++++
2 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/bash-complete.el b/bash-complete.el
index 1b78c8c8eb..06df1d4b3a 100644
--- a/bash-complete.el
+++ b/bash-complete.el
@@ -57,19 +57,18 @@ at POS, the current word: ( (word1 word2 ...) . wordnum )"
((and (char-before) (= ?\\ (char-before)))
(forward-char)
(bash-complete-split-1
- start end pos
- (if (and quote (= quote (char-before))) nil quote)
+ start end pos quote
accum
(concat (substring straccum 0 (- (length straccum) 1)) (char-to-string
(char-before)))))
;; opening quote
((and (not quote) (char-after) (or (= ?' (char-after)) (= ?\"
(char-after))))
(bash-complete-split-0 start end pos accum straccum))
;; closing quote
- ((and quote (= quote (char-after)))
+ ((and quote (char-after) (= quote (char-after)))
(forward-char)
(bash-complete-split-0 start end pos accum straccum))
;; space inside a quote
- ((and quote (not (= quote (char-after))))
+ ((and quote (char-after) (not (= quote (char-after))))
(forward-char)
(bash-complete-split-1
start end pos quote accum
diff --git a/bash-complete_test.el b/bash-complete_test.el
index 5d6a276124..3c6f9447b6 100644
--- a/bash-complete_test.el
+++ b/bash-complete_test.el
@@ -46,12 +46,24 @@
(bash-complete-split 1 (line-end-position) 0))
'("a" "hello world" "b" "c"))
+ ("bash-complete-split double quotes escaped"
+ (sz-testutils-with-buffer
+ '("a \"-\\\"hello world\\\"-\" b c")
+ (bash-complete-split 1 (line-end-position) 0))
+ '("a" "-\"hello world\"-" "b" "c"))
+
("bash-complete-split single quotes"
(sz-testutils-with-buffer
'("a 'hello world' b c")
(bash-complete-split 1 (line-end-position) 0))
'("a" "hello world" "b" "c"))
+ ("bash-complete-split single quotes escaped"
+ (sz-testutils-with-buffer
+ '("a '-\\'hello world\\'-' b c")
+ (bash-complete-split 1 (line-end-position) 0))
+ '("a" "-'hello world'-" "b" "c"))
+
("bash-complete-split complex quote mix"
(sz-testutils-with-buffer
'("a hel\"lo w\"o'rld b'c d")
- [nongnu] elpa/bash-completion 318e32979f 135/313: Display completion progress message only if completion takes too long., (continued)
- [nongnu] elpa/bash-completion 318e32979f 135/313: Display completion progress message only if completion takes too long., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 2378b04eeb 140/313: More easily call bash-completion-dynamic-complete-nocomint, faking bash, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 43348d0be1 143/313: Bugfixes: remove references to nonexistent variables, such as, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 583d1dde61 151/313: Remove usage of seq-position with a custom implementation., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 664452aca2 157/313: Merge pull request #22 from kfogel/21-fix-completion-re-21149fdc, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion ad8d72c626 162/313: README nit pick ; ), ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion c494a89070 168/313: Run tests under Emacs 24.1: alias letf to cl-letf., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion f523a290a6 169/313: Make the integration tests run on Emacs 24.1., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion bbff4fa527 172/313: Merge branch 'master' of github.com:szermatt/emacs-bash-completion, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion b307dc24c3 005/313: keep cword, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion a79137cc86 004/313: escaped quotes,
ELPA Syncer <=
- [nongnu] elpa/bash-completion 581864111e 039/313: integration test harness, process buffer cleanup, hidden buffer, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 3e1481741c 031/313: remove messages, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 0d360a45cd 017/313: fixed test case, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion c28492a749 036/313: wordbreak before and after, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 8b02aafc67 046/313: separators, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 2390d5cdf3 061/313: more commends and documentation; still need a commentary section, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion c0f7c20a6b 094/313: added license and missing test dependency, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion a2d322fb79 054/313: Added customization group, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 983f5c28e9 106/313: Merge pull request #2 from frankpzh/patch-1, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 9f02a62609 049/313: re-enabled parse-line cursor at the beginning/in the middle tests, ELPA Syncer, 2022/12/03