Skip to content

Instantly share code, notes, and snippets.

@elanpang
elanpang / zstyle-bool.zsh
Created June 15, 2022 10:05 — forked from mattmc3/README.md
zsh: zstyle examples
# zstyle-bool
echo "For values that can be missing or default to true, use -T"
function test_bool_zstyle_default_true {
if zstyle -T ':foo:bar' value; then
echo "bar is true or unset"
else
echo "bar is false"
fi
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">