about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2020-06-08 11:16:13 -0500
committerCase Duckworth2020-06-08 11:16:13 -0500
commit97e8482bd5e162e47fa39a23b9bcc6bab5d96808 (patch)
tree5deeeaabc229a30031367258d5cfba5baf2444cb
parentLog function name (diff)
downloadbollux-97e8482bd5e162e47fa39a23b9bcc6bab5d96808.tar.gz
bollux-97e8482bd5e162e47fa39a23b9bcc6bab5d96808.zip
Enable extglob on extglob
-rwxr-xr-xbollux4
1 files changed, 3 insertions, 1 deletions
diff --git a/bollux b/bollux index 8e1207b..919c370 100755 --- a/bollux +++ b/bollux
@@ -689,7 +689,7 @@ typeset_gemini() {
689 ( 689 (
690 : 690 :
691 : 691 :
692 ) # XXX this doesn't work!? 692 ) # dumb formatting brought to you by shfmt
693 log d "LINES=$LINES; COLUMNS=$COLUMNS" 693 log d "LINES=$LINES; COLUMNS=$COLUMNS"
694 T_WIDTH=$COLUMNS 694 T_WIDTH=$COLUMNS
695 fi 695 fi
@@ -825,7 +825,9 @@ fold_line() { # fold_line WIDTH TEXT
825 set -- $2 # TODO: is this the best way? 825 set -- $2 # TODO: is this the best way?
826 826
827 for word; do 827 for word; do
828 shopt -s extglob
828 plain="${word//$'\x1b'\[*([0-9;])m/}" 829 plain="${word//$'\x1b'\[*([0-9;])m/}"
830 shopt -u extglob
829 wl=$((${#plain} + 1)) 831 wl=$((${#plain} + 1))
830 if (((ll + wl) >= width)); then 832 if (((ll + wl) >= width)); then
831 printf "\n%${margin}s" ' ' 833 printf "\n%${margin}s" ' '