mirror of
https://github.com/tmux/tmux.git
synced 2026-10-06 17:49:52 +00:00
Switch show-options over to using a format and add -F.
This commit is contained in:
17
hooks.c
17
hooks.c
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: hooks.c,v 1.14 2026/07/13 22:03:08 nicm Exp $ */
|
||||
/* $OpenBSD: hooks.c,v 1.15 2026/07/22 20:12:58 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2026 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||
@@ -472,3 +472,18 @@ hooks_monitor_to_string(struct options_entry *o)
|
||||
}
|
||||
return (s);
|
||||
}
|
||||
|
||||
/* Get the parts of a hook monitor. */
|
||||
int
|
||||
hooks_monitor_get(struct options_entry *o, enum monitor_type *type, int *id,
|
||||
const char **format)
|
||||
{
|
||||
struct hook_monitor *hm = options_get_monitor_data(o);
|
||||
|
||||
if (hm == NULL)
|
||||
return (0);
|
||||
*type = hm->type;
|
||||
*id = hm->id;
|
||||
*format = hm->format;
|
||||
return (1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user