commands/include: handle many files in single line

i3 supports including multiple files in a single line, whereas sway
limits to single file per line.
This commit is contained in:
mtvare6 2024-11-13 22:32:00 +05:30 committed by Simon Ser
parent a2c73c9b8b
commit fec3da7d58
2 changed files with 5 additions and 5 deletions

View file

@ -3,12 +3,12 @@
struct cmd_results *cmd_include(int argc, char **argv) {
struct cmd_results *error = NULL;
if ((error = checkarg(argc, "include", EXPECTED_EQUAL_TO, 1))) {
if ((error = checkarg(argc, "include", EXPECTED_AT_LEAST, 1))) {
return error;
}
char *files = join_args(argv, argc);
// We don't care if the included config(s) fails to load.
load_include_configs(argv[0], config, &config->swaynag_config_errors);
load_include_configs(files, config, &config->swaynag_config_errors);
return cmd_results_new(CMD_SUCCESS, NULL);
}