Check whether a state key is present

SolidGroundUX DocumentationSolidGroundUX
NL

fn: sgnd_state_has

Purpose

Check whether a state key is present.

Arguments

  • --file FILE — Optional state file path.
  • KEY — Valid shell identifier to test.

Returns

0 if the key exists; 1 if absent or invalid.

Usage

  if sgnd_state_has SGND_UI_STYLE; then :; fi