zpmod  b19981f
High-performance Zsh module for script optimization and filesystem helpers
zpmod_emoji.h File Reference

Optional terminal/locale detection for emoji support in messages. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int zp_icons_enabled (void)
 Determine if emoji/icons should be printed. More...
 
const char * zp_icon (const char *s)
 Return the given icon string if icons are enabled, else empty string. More...
 

Detailed Description

Optional terminal/locale detection for emoji support in messages.

Definition in file zpmod_emoji.h.

Function Documentation

◆ zp_icon()

const char* zp_icon ( const char *  s)

Return the given icon string if icons are enabled, else empty string.

Parameters
sUTF-8 icon string (e.g., "⏱️ ").
Returns
s or "" depending on zp_icons_enabled().

Return the given icon string if icons are enabled, else empty string.

Definition at line 58 of file emoji.c.

References zp_icons_enabled().

Referenced by bin_zpdirlist(), bin_zpmod(), bin_zppathstat(), bin_zpreadfile(), cmd_pathstat(), readarray_usage(), rh_write(), zp_append_report(), zp_build_source_report(), zp_cc_ensure_dir(), zp_cc_incremental_update(), zp_cc_rebuild(), zp_compaudit_cache_core(), zp_rehash_diff_core(), zp_rh_dir(), and zpmod_usage().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ zp_icons_enabled()

int zp_icons_enabled ( void  )

Determine if emoji/icons should be printed.

Checks environment and locale; cached after first call.

Returns
1 if enabled, 0 otherwise.

Determine if emoji/icons should be printed.

Definition at line 25 of file emoji.c.

References getsparam(), and s_cached.

Referenced by zp_icon().

Here is the call graph for this function:
Here is the caller graph for this function: