tmpfiles: add --tldr
This is like --cat-config, but omits the comments and empty lines. The name is incoungrous with --cat-config, but I don't see a nice way to call it that wouldn't be annoyingly long. pager_open() is moved to cat_config() to remove some lines from run().
This commit is contained in:
@@ -15,8 +15,10 @@ int terminal_urlify_path(const char *path, const char *text, char **ret);
|
||||
int terminal_urlify_man(const char *page, const char *section, char **ret);
|
||||
|
||||
typedef enum CatFlags {
|
||||
CAT_FORMAT_HAS_SECTIONS = 1 << 0, /* Sections are meaningful for this file format */
|
||||
CAT_TLDR = 1 << 1, /* Only print comments and relevant section headers */
|
||||
CAT_CONFIG_OFF = 0,
|
||||
CAT_CONFIG_ON = 1 << 0,
|
||||
CAT_FORMAT_HAS_SECTIONS = 1 << 1, /* Sections are meaningful for this file format */
|
||||
CAT_TLDR = 1 << 2, /* Only print comments and relevant section headers */
|
||||
} CatFlags;
|
||||
|
||||
int cat_files(const char *file, char **dropins, CatFlags flags);
|
||||
|
||||
Reference in New Issue
Block a user