Sublime Forum

Slash not supported in project build system name?

#1

When I have a build system in my project file which has a slash ("/") in its name, the part before the last slash does not get shown when I list all build systems using Ctrl+Shift+B. Is this intended behaviour? I couldn’t find it on docs.sublimetext.info.

Cheers, Bram

0 Likes

#2

If you’re on Windows, try using \\ instead of /

0 Likes

#3

Thanks, but I’m on Linux, and it’s not a path field. I meant the label/name of the build system.

Cheers, Bram

0 Likes

#4

Maybe you can share your .sublime-build file? it works for me, setting the "name" value to something including a / character (or indeed many such characters) inside a variant. Tested on Linux and Windows.

0 Likes

#5

I can confirm this; it seems like it’s a bug of some sort (or at the least a bizarre inconsistency). My project build system looks like this:

    "build_systems":
    [
        {
            "name": "DataMill: build DataMill/DevSrc",
            "shell_cmd": "make COLOUR_WARNINGS=NO",
            "file_regex": "^(..[^:\n]*):([0-9]+):?([0-9]+)?:? (.*)$",
            "working_dir": "${folder:${project_path:${file_path}}}",
        }
    ]

The popup that you get for Ctrl+Shift+B only says DevSrc in this case, but the Tools > Build System lists it with the full name:

I would expect both of them to display the same thing.

1 Like

#6

The project documentation doesn’t mention that / can’t be used in the build system name, so I guess it’s a bug worth logging at https://github.com/SublimeTextIssues/Core/issues.

The following example in the .sublime-project file:

"build_systems":
[
    {
        "name": "List/Test/ing",
        "shell_cmd": "dir",
        
        "variants": [
            {
                "name": "abc/def/ghi",
                "shell_cmd": "dir /ad",
            }
        ]
    }
]

shows as:

ing
ing - abc/def/ghi

so it seems it is only an issue with the base name of the build system and not the variants. This is probably because the base name, when not project-related, is defined using the filename of the .sublime-build file, and ST3 uses the same code to display the name. i.e. it strips the “path”.

This can be seen using:

"name": "List/Test/ing.sublime-build",

it shows up as ing still in the build variants list

1 Like