Skip to content

strip leading/trailing spaces from -v params #609

@VladimirAlexiev

Description

@VladimirAlexiev

Take this query

select ?x ?p ?y
where {
    service <x-sparql-anything:> {
      fx:properties fx:location $_file; fx:media-type "text/plain"; fx:txt.split "\n".
      [] fx:anySlot ?line.
      ?x ?p ?y
    }
}

This invocation returns the file lines:

sparql-anything -q test.rq -v file=my.txt

This invocation returns the list of files in cwd:

sparql-anything -q test.rq -v file= my.txt

The only difference is that there is a space after =.
IMHO that is confusing and undesirable.

If someone really wants a leading space in a param,
maybe a call like this could work: -v 'mySpace= ... and more... '

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