mirror of
https://github.com/NikitaIvanovV/ctpv.git
synced 2025-02-12 16:39:23 +01: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() {
|
||||
[ -z "$force_kitty" ] && use_ueberzug && return 1
|
||||
[ -z "$forcekitty" ] && use_ueberzug && return 1
|
||||
is_kitty
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
@ -14,7 +14,7 @@ struct CTPV {
|
||||
} mode;
|
||||
char *server_id_s;
|
||||
struct {
|
||||
int force_kitty;
|
||||
int forcekitty;
|
||||
} 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,
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user