~xdavidwu/dotfiles

b2aa836c5eea1d7fcc03ec144a65bf5f1c32e4e3 — xdavidwu 3 years ago efd336a
bash: imgcat: handle unavailable estimation
1 files changed, 4 insertions(+), 1 deletions(-)

M .bashrc
M .bashrc => .bashrc +4 -1
@@ 126,7 126,10 @@ imgcat_max_pixels() {
}

imgcat() {
	convert $@ -resize $(imgcat_max_pixels)\> sixel:-
	EXTRA=
	MAX=$(imgcat_max_pixels 2>/dev/null)
	[ -n "$MAX" ] && EXTRA="-resize ${MAX}\>"
	convert $@ $EXTRA sixel:-
}

# application envs