Commit a9aa2932a4dbe58ddab935e9f341fdfaffb784b5

Thomas de Grivel 2018-07-10T12:54:15

sh-var

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/unix/syntaxes.lisp b/unix/syntaxes.lisp
index 24d077e..2e20092 100644
--- a/unix/syntaxes.lisp
+++ b/unix/syntaxes.lisp
@@ -129,9 +129,10 @@
              ((eq quote c) (setq quote nil))
              ((and (null quote) (or (eq #\" c) (eq #\' c))) (setq quote c))
              ((and (null quote) (sh-word-delimiter-p c)) (return))
-             (:otherwise (write-char c out)))))
+             (:otherwise (write-char c out))))
+         (incf i))
       (when (or quote backslash)
         (error "Unmatched quote")))))
 
 (define-syntax sh-var (var (#'parse-sh-var-value value))
-    #~|^\s*(\w*)=(.*)|)
+    #~|^\s*(\w+)=(.*)|)