fix(arty): work around glow ~ expansion bug in style path
glow v2.1.2 validates the style path with ~ expanded but passes the original unexpanded string to glamour's file reader, causing ENOENT. Fix: pass the style via --style flag so bash expands $HOME before glow sees it. Revert glow.yml style to "auto" (unused when arty drives it). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
# style name or JSON path (default "auto")
|
# style name or JSON path (default "auto")
|
||||||
style: "~/.config/glow/nord.json"
|
style: "auto"
|
||||||
# mouse support (TUI-mode only)
|
# mouse support (TUI-mode only)
|
||||||
mouse: false
|
mouse: false
|
||||||
# use pager to display markdown
|
# use pager to display markdown
|
||||||
|
|||||||
@@ -1125,8 +1125,12 @@ show_notes() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
local glow_style="auto"
|
||||||
|
local glow_style_file="$HOME/.config/glow/nord.json"
|
||||||
|
[[ -f "$glow_style_file" ]] && glow_style="$glow_style_file"
|
||||||
|
|
||||||
if command -v glow &>/dev/null; then
|
if command -v glow &>/dev/null; then
|
||||||
printf '%s\n' "$md" | glow -
|
printf '%s\n' "$md" | glow --style "$glow_style" -
|
||||||
elif command -v mdcat &>/dev/null; then
|
elif command -v mdcat &>/dev/null; then
|
||||||
printf '%s\n' "$md" | mdcat
|
printf '%s\n' "$md" | mdcat
|
||||||
elif command -v python3 &>/dev/null; then
|
elif command -v python3 &>/dev/null; then
|
||||||
|
|||||||
Reference in New Issue
Block a user