Skip to content

Fix for #18027

Stefan Holdermans requested to merge (removed):wip/T18027 into master

These patches implement support for file names containing spaces to be passed as arguments to GHCi's ':script' command (#18027 (closed)). Two forms are supported: (1) escaping spaces in file names with backslashes and (2) enclosing file names that contain spaces in double quotes.

The current implementation scans for file names in the argument that is passed to ':script' using the standard list function 'words'. These patches supply a custom version of words that does not its input string at spaces that are escaped with backslashes and that treats character sequences enclosed in double quotes as single words. The test suite is expanded with tests for ':script' with file names that contain spaces and with tests that validate that syntax errors are (still) report if no file names as passed or if more than one file name is passed.

Merge request reports