Commits

Kirill Simonov committed bbaaa48

htsql-ctl shell: ignore non-indented comments.

Comments (0)

Files changed (1)

src/htsql/ctl/shell.py

             self.ctl.out()
             return True
 
-        # Skip empty lines.
+        # Skip empty lines and comments.
         line = line.strip()
-        if not line:
+        if not line or line.startswith('#'):
             return
 
         return self.execute(line)
             if not line.strip():
                 if lines:
                     lines.append(line)
+            elif line.startswith('#'):
+                if lines:
+                    blocks.append(lines)
+                lines = []
             elif line == line.lstrip():
                 if lines:
                     blocks.append(lines)