Skip to content

ghci: the filename in :script <filename> doesn't support spaces.

Summary

Write a brief description of the issue.

Steps to reproduce

mkdir foo\ bar
echo putStrLn \"foo\" > foo\ bar/foo.hs
ghci
GHCi, version 8.6.5: http://www.haskell.org/ghc/  :? for help
Prelude> :script foo\ bar/foo.hs 
syntax:  :script <filename>
Prelude> :script "foo\ bar/foo.hs"
syntax:  :script <filename>
Prelude> :script "foo bar/foo.hs"
syntax:  :script <filename>
Prelude> 
Leaving GHCi.

Expected behavior

In ghci, path tab-completes with the space escaped with \. I'd expect this to work.

Environment

  • GHC version used: 8.6.5
  • Operating System: Linux Mint
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information