mirror of
https://github.com/NikitaIvanovV/ctpv.git
synced 2025-06-20 18:08:02 +02:00
Always use the same naming format for options
This commit is contained in:
parent
31fce36c1a
commit
456a0eb4da
@ -11,7 +11,7 @@ use_ueberzug() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
use_kitty() {
|
use_kitty() {
|
||||||
[ -z "$force_kitty" ] && use_ueberzug && return 1
|
[ -z "$forcekitty" ] && use_ueberzug && return 1
|
||||||
is_kitty
|
is_kitty
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ static Token token;
|
|||||||
static VectorPreview *previews;
|
static VectorPreview *previews;
|
||||||
|
|
||||||
static struct Option options[] = {
|
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)
|
static void any_type_null(char **s)
|
||||||
|
@ -14,7 +14,7 @@ struct CTPV {
|
|||||||
} mode;
|
} mode;
|
||||||
char *server_id_s;
|
char *server_id_s;
|
||||||
struct {
|
struct {
|
||||||
int force_kitty;
|
int forcekitty;
|
||||||
} opts;
|
} opts;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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,
|
int run_script(char *script, size_t script_len, int *exitcode, int *signal,
|
||||||
SpawnProg sp, void *sp_arg)
|
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 *scr = prepend_helpers(script, script_len);
|
||||||
char *args[] = SHELL_ARGS(scr);
|
char *args[] = SHELL_ARGS(scr);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user