Sublime Forum

Parameters for build system using terminus

#1

Hello, I would like to create a custom build system that displays an input handler for me to type the different parameters that will then be executed when I run the program. My current build system is the following

{
"shell_cmd": "gcc \"${file}\" -o \"${file_path}/${file_base_name}.exe\"",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c",

"variants":
[
	{
		"name": "Run",
		"shell_cmd": "gcc \"${file}\" -o \"${file_path}/${file_base_name}.exe\" && \"${file_path}/${file_base_name}.exe\"",
		"target": "terminus_open",
		"auto_close": false,
		"title": "C program",
		"timeit": false,
		"tag": "C-program"
	}
]
}

I would like to add a variant that builds my code the same way as before, and then runs

./${file_base_name} parameters

where parameters is the list of parameters that I have been asked to type before.
Is it possible to do something like that ?

0 Likes