Always use the same naming format for options

This commit is contained in:
Nikita Ivanov 2022-06-21 01:52:58 +05:00
parent 31fce36c1a
commit 456a0eb4da
No known key found for this signature in database
GPG Key ID: 6E656AC5B97B5133
4 changed files with 4 additions and 4 deletions

View File

@ -11,7 +11,7 @@ use_ueberzug() {
}
use_kitty() {
[ -z "$force_kitty" ] && use_ueberzug && return 1
[ -z "$forcekitty" ] && use_ueberzug && return 1
is_kitty
}

View File

@ -41,7 +41,7 @@ static Token token;
static VectorPreview *previews;
static struct Option options[] = {
{ "forcekitty", OPTION_BOOL, { .i = &ctpv.opts.force_kitty } },
{ "forcekitty", OPTION_BOOL, { .i = &ctpv.opts.forcekitty } },
};
static void any_type_null(char **s)

View File

@ -14,7 +14,7 @@ struct CTPV {
} mode;
char *server_id_s;
struct {
int force_kitty;
int forcekitty;
} opts;
};

View File

@ -34,7 +34,7 @@ static char *prepend_helpers(char *str, size_t len)
int run_script(char *script, size_t script_len, int *exitcode, int *signal,
SpawnProg sp, void *sp_arg)
{
ERRCHK_RET_ERN(setenv("force_kitty", ctpv.opts.force_kitty ? "1" : "", 1) == -1);
ERRCHK_RET_ERN(setenv("forcekitty", ctpv.opts.forcekitty ? "1" : "", 1) == -1);
char *scr = prepend_helpers(script, script_len);
char *args[] = SHELL_ARGS(scr);