Skip to content

Support for # comments #112

@thomask77

Description

@thomask77

When feeding prepared scripts to click-repl, it would be useful to support # comments.

shlex already supports this feature, but click-repl explicitly disables it (why?):

As a workaround, I vendored click-repl and commented out that line.

Additionally, this needs a check to skip processing if the resulting args are empty:

...
             if args is None:
                 continue

+            # 2024-01-24, tk:
+            #
+            # Also continue if args is empty to skip lines that
+            # consist of white space, or are commented out.
+            #
+            if not args:
+                continue
+

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions