mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-05 10:38:08 +01:00
This is a partial revert and rework of commit c79575362eeb8f8d24cd2c141928d7d8f22eeb94, for the `gsettings` script only (the other completion scripts are fine). I blindly added quoting to everything shellcheck told me to, without testing it properly. As it turns out, the `$schemadir` argument to `gsettings` invocations was deliberately not quoted, so that it would expand to zero arguments if unset, and two arguments (`--schemadir /some/path`) if set earlier in the command-being-completed. Quoting it meant that it expanded to one argument (the empty string) if unset, which caused the `gsettings` subcommands to fail, and hence any further tab completion to fail. Fix that as suggested on https://www.shellcheck.net/wiki/SC2086 by turning `schemadir` into an array, which either has zero members if unset, or two members if set. Signed-off-by: Philip Withnall <pwithnall@gnome.org>