mirror of
https://github.com/swaywm/sway.git
synced 2024-11-27 18:31:28 +00:00
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:
parent
a2c73c9b8b
commit
fec3da7d58
|
@ -3,12 +3,12 @@
|
||||||
|
|
||||||
struct cmd_results *cmd_include(int argc, char **argv) {
|
struct cmd_results *cmd_include(int argc, char **argv) {
|
||||||
struct cmd_results *error = NULL;
|
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;
|
return error;
|
||||||
}
|
}
|
||||||
|
char *files = join_args(argv, argc);
|
||||||
// We don't care if the included config(s) fails to load.
|
// 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);
|
return cmd_results_new(CMD_SUCCESS, NULL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,8 +66,8 @@ The following commands may only be used in the configuration file.
|
||||||
*default_orientation* horizontal|vertical|auto
|
*default_orientation* horizontal|vertical|auto
|
||||||
Sets the default container layout for tiled containers.
|
Sets the default container layout for tiled containers.
|
||||||
|
|
||||||
*include* <path>
|
*include* <paths...>
|
||||||
Includes another file from _path_. _path_ can be either a full path or a
|
Include files from _paths_. _paths_ can include either a full path or a
|
||||||
path relative to the parent config, and expands shell syntax (see
|
path relative to the parent config, and expands shell syntax (see
|
||||||
*wordexp*(3) for details). The same include file can only be included once;
|
*wordexp*(3) for details). The same include file can only be included once;
|
||||||
subsequent attempts will be ignored.
|
subsequent attempts will be ignored.
|
||||||
|
|
Loading…
Reference in a new issue