# HG changeset patch # User Aleksej Bobylev # Date 1439913850 -10800 # Node ID f894c64b5e7cfe2222880c1a65aa10b856be9ddf # Parent d9e8cd5b9ad814d325485a95801469512f45e3a1 libtaz.sh: do not itemize for gtk output diff -r d9e8cd5b9ad8 -r f894c64b5e7c rootfs/lib/libtaz.sh --- a/rootfs/lib/libtaz.sh Sun Aug 02 13:29:21 2015 +0200 +++ b/rootfs/lib/libtaz.sh Tue Aug 18 19:04:10 2015 +0300 @@ -227,12 +227,17 @@ # Print long line as list item itemize() { - local inp="$@" cols=$(get_cols) first offset - cols="${cols:-80}" - first="$(echo -e "$inp" | fold -sw$cols | head -n1)" - echo "$first" - cols1="$(echo "${first:1}" | wc -c)" - offset=$(echo "$first" | sed -n 's|^\([^:\*-]*[:\*-]\).*$|\1|p' | wc -m) - echo "${inp:$cols1}" | fold -sw$((cols - offset)) | awk \ - '($0){printf "%'$offset's%s\n","",$0}' + case $output in + gtk) echo "$@";; + *) + local inp="$@" cols=$(get_cols) first offset + cols="${cols:-80}" + first="$(echo -e "$inp" | fold -sw$cols | head -n1)" + echo "$first" + cols1="$(echo "${first:1}" | wc -c)" + offset=$(echo "$first" | sed -n 's|^\([^:\*-]*[:\*-]\).*$|\1|p' | wc -m) + echo "${inp:$cols1}" | fold -sw$((cols - offset)) | awk \ + '($0){printf "%'$offset's%s\n","",$0}' + ;; + esac }