Skip to content

Commit d184524

Browse files
dhhclaudecodex
committed
Unquote the new variables inside [[ ]]
AGENTS.md asks for unquoted variables inside `[[ ]]`, with quotes reserved for string literals being compared. The three conditions added here quoted them. 🤖 Generated by Opus 5 in Claude Code. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-Authored-By: Codex XHigh <noreply@openai.com>
1 parent 9d8c017 commit d184524

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

bin/omarchy-brightness-display-apple

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# caching (detect every run) rather than fall back to a predictable, world-writable
99
# /tmp path another user could pre-create.
1010
device_cache=""
11-
if [[ -n "${XDG_RUNTIME_DIR:-}" ]]; then
11+
if [[ -n ${XDG_RUNTIME_DIR:-} ]]; then
1212
device_cache="$XDG_RUNTIME_DIR/omarchy-brightness-display-apple.device"
1313
fi
1414
no_osd=0
@@ -34,7 +34,7 @@ find_apple_display_device() {
3434
local cached=""
3535
local device=""
3636

37-
if [[ -n "$device_cache" && -r $device_cache ]]; then
37+
if [[ -n $device_cache && -r $device_cache ]]; then
3838
read -r cached <"$device_cache" || true
3939
# Trust a cached value only if it still names a hiddev character device. A
4040
# stale or unexpected cache (a regular file, a non-hiddev node) is ignored and
@@ -50,7 +50,7 @@ find_apple_display_device() {
5050
device="$(detect_apple_display_device)" || return 1
5151
[[ -n $device ]] || return 1
5252

53-
if [[ -n "$device_cache" ]]; then
53+
if [[ -n $device_cache ]]; then
5454
printf '%s\n' "$device" >"$device_cache"
5555
fi
5656
printf '%s\n' "$device"

0 commit comments

Comments
 (0)