From 97e8482bd5e162e47fa39a23b9bcc6bab5d96808 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 8 Jun 2020 11:16:13 -0500 Subject: Enable extglob on extglob --- bollux | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bollux b/bollux index 8e1207b..919c370 100755 --- a/bollux +++ b/bollux @@ -689,7 +689,7 @@ typeset_gemini() { ( : : - ) # XXX this doesn't work!? + ) # dumb formatting brought to you by shfmt log d "LINES=$LINES; COLUMNS=$COLUMNS" T_WIDTH=$COLUMNS fi @@ -825,7 +825,9 @@ fold_line() { # fold_line WIDTH TEXT set -- $2 # TODO: is this the best way? for word; do + shopt -s extglob plain="${word//$'\x1b'\[*([0-9;])m/}" + shopt -u extglob wl=$((${#plain} + 1)) if (((ll + wl) >= width)); then printf "\n%${margin}s" ' ' -- cgit 1.4.1-21-gabe81