-
Notifications
You must be signed in to change notification settings - Fork 233
How to pass files with spaces #480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
This is a bug of SourceKitten. |
Great, thank you! Will I have to escape the spaces then? I guess "" will be necessary right? |
Either escape or double quote will be required. $ echo 'print("space hello")'>space\ hello.swift
$ sourcekitten index --file "space hello.swift" --compilerargs -- "`pwd`/space hello.swift"
{
"key.dependencies" : [
{
"key.filepath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Toolchains\/XcodeDefault.xctoolchain\/usr\/lib\/swift\/macosx\/x86_64\/Swift.swiftmodule",
"key.hash" : "22NC2OR6IU6GZ",
"key.is_system" : true,
"key.kind" : "source.lang.swift.import.module.swift",
"key.name" : "Swift"
}
],
"key.entities" : [
{
"key.column" : 1,
"key.kind" : "source.lang.swift.ref.function.free",
"key.line" : 1,
"key.name" : "print(_:separator:terminator:)",
"key.usr" : "s:s5printySayypGd_SS9separatorSS10terminatortF"
}
],
"key.hash" : "2PH1NRS6GZFLH"
}
$ sourcekitten index --file space\ hello.swift --compilerargs -- `pwd`/space\ hello.swift
{
"key.dependencies" : [
{
"key.filepath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Toolchains\/XcodeDefault.xctoolchain\/usr\/lib\/swift\/macosx\/x86_64\/Swift.swiftmodule",
"key.hash" : "22NC2OR6IU6GZ",
"key.is_system" : true,
"key.kind" : "source.lang.swift.import.module.swift",
"key.name" : "Swift"
}
],
"key.entities" : [
{
"key.column" : 1,
"key.kind" : "source.lang.swift.ref.function.free",
"key.line" : 1,
"key.name" : "print(_:separator:terminator:)",
"key.usr" : "s:s5printySayypGd_SS9separatorSS10terminatortF"
}
],
"key.hash" : "2PH1NRS6GZFLH"
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey,
when trying to index files with spaces I get either an "Illegal instruction: 4" or an empty return JSON.
Minimalistic example:
sourcekitten index --file "$(pwd)/Model/Test.swift" --compilerargs -- "$(pwd)/Model/Test.swift $(pwd)/Views/Class SpaceTest/SpaceTest.swift"
{
}
sourcekitten index --file "$(pwd)/Views/Class SpaceTest/SpaceTest.swift" --compilerargs -- "$(pwd)/Views/Class SpaceTest/SpaceTest.swift"
Illegal instruction: 4
As far as I can see it's not able to find the files.
I've already tried different approaches to escape the space. Including "" "\" "_" "-" using '' for the filename.
Do you know which is the right way to escape spaces?
The text was updated successfully, but these errors were encountered: