MCPcopy Create free account
hub / github.com/basecamp/omarchy / guardLine

Function guardLine

shell/plugins/menu/MenuModel.js:457–460  ·  view source on GitHub ↗
(id, tag, expression)

Source from the content-addressed store, hash-verified

455}
456
457function guardLine(id, tag, expression) {
458 return "if { " + substituteGuardReaders(expression) + "; } >/dev/null 2>&1; then echo "
459 + id + ":" + tag + ":1; else echo " + id + ":" + tag + ":0; fi\n"
460}
461
462// One bash script for every `when:` and `checked:` in the menu, reporting
463// `<id>:<w|c>:<0|1>` per line. Speed is the whole point: the menu opens on

Callers 1

guardScriptFunction · 0.85

Calls 1

substituteGuardReadersFunction · 0.85

Tested by

no test coverage detected