Skip to content

Automatic quotation of interpolations #37

@yevhen

Description

@yevhen

Since the actual values that will be inlined from interpolations are opaque, to get rid of possible misinterpretation of values that may contain spaces, the interpolations need to be quoted, e.g. await $"app '{path}'".

It would be super-cool if we can do the automatic quotation of interpolated expressions when such strings are the input to await or Shell.Run.

Concerns:

  • Interpolations which area already quoted
  • Interpolations which reside inside quotes, e.g. await $"app 'some {path} arg with spaces'"
  • Interpolations which reside between quotes, e.g. await $"app 'arg1' {path} 'arg2'"
  • How to determine if interpolation should be quoted for a particular invocation (e.g. call to Shell.Run)?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions