Commits

Kirill Simonov committed eee878c

htsql-ctl shell: allow non-indented comments in multi-line queries.

Comments (0)

Files changed (1)

src/htsql/ctl/shell.py

         blocks = []
         lines = []
         for line in stream:
-            if not line.strip():
+            if not line.strip() or line.startswith('#'):
                 if lines:
                     lines.append(line)
-            elif line.startswith('#'):
-                if lines:
-                    blocks.append(lines)
-                lines = []
             elif line == line.lstrip():
                 if lines:
                     blocks.append(lines)