Add simple comparisons in formats: #{==:a,b} and #{!=:a,b} ("a" and "b"

are expanded so can compare formats). And expand the condition to
#{?a,b,c} (the "a" part) if it doesn't work as a simple lookup.

Also add FORMAT_NOJOBS flag to disable jobs in a format.
This commit is contained in:
nicm
2017-01-09 21:03:25 +00:00
parent 561b5c6fdb
commit 844f2eacf4
3 changed files with 105 additions and 27 deletions

1
tmux.h
View File

@@ -1568,6 +1568,7 @@ char *paste_make_sample(struct paste_buffer *);
/* format.c */
#define FORMAT_STATUS 0x1
#define FORMAT_FORCE 0x2
#define FORMAT_NOJOBS 0x4
struct format_tree;
struct format_tree *format_create(struct cmdq_item *, int);
void format_free(struct format_tree *);