public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Ulrich Müller" <ulm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/eselect:master commit in: libs/
Date: Tue, 19 Nov 2013 08:17:23 +0000 (UTC)	[thread overview]
Message-ID: <1384502491.ba92c398946c8608aaf8b0884d7ed2a7d2905586.ulm@gentoo> (raw)

commit:     ba92c398946c8608aaf8b0884d7ed2a7d2905586
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 14 23:56:22 2013 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Fri Nov 15 08:01:31 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/eselect.git;a=commit;h=ba92c398

More cosmetic changes in output.bash.

---
 libs/output.bash.in | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/libs/output.bash.in b/libs/output.bash.in
index 78e0c4f..5390792 100644
--- a/libs/output.bash.in
+++ b/libs/output.bash.in
@@ -90,6 +90,7 @@ write_kv_list_entry() {
 	local n text key val lindent rindent
 	local left=${COLOUR_LIST_LEFT} right=${COLOUR_LIST_RIGHT}
 	local normal=${COLOUR_NORMAL}
+	local cols=${COLUMNS:-80}
 	local IFS=$' \t\n'
 
 	if [[ $1 == "-p" ]]; then
@@ -117,19 +118,15 @@ write_kv_list_entry() {
 		n=$(( 28 + ${#rindent} ))
 	fi
 
-	space ${n}
-	echo -n -e "${right}"
+	echo -n -e "$(space ${n})${right}"
 	n=$(( 28 + ${#rindent} ))
 
-	local cols=${COLUMNS:-80}
-	local cwords=$(apply_text_highlights "${right}" "${val}")
-
 	text=${val//\%%%??%%%/}
 	# only loop if it doesn't fit on the same line
 	if [[ $(( ${n} + ${#text} )) -ge ${cols} ]]; then
 		local i=0 spc=""
 		rindent=$(space ${n})
-		cwords=( ${cwords} )
+		local cwords=( $(apply_text_highlights "${right}" "${val}") )
 		for text in ${val}; do
 			text=${text//\%%%??%%%/}
 			# put the word on the same line if it fits
@@ -141,11 +138,11 @@ write_kv_list_entry() {
 				echo -n -e "\n${rindent}${cwords[i]}"
 				n=$(( ${#rindent} + ${#text} ))
 			fi
-			i=$(( ${i} + 1 ))
+			(( i++ ))
 			spc=" "
 		done
 	else
-		echo -n -e "${cwords}"
+		echo -n -e "$(apply_text_highlights "${right}" "${val}")"
 	fi
 	echo -e "${normal}"
 }


             reply	other threads:[~2013-11-19  8:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-19  8:17 Ulrich Müller [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-06-18 19:32 [gentoo-commits] proj/eselect:master commit in: libs/ Ulrich Müller
2013-11-10 20:24 Ulrich Müller
2013-03-02 11:07 Ulrich Mueller
2013-01-13 13:10 Ulrich Mueller
2013-01-05 13:47 Ulrich Mueller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1384502491.ba92c398946c8608aaf8b0884d7ed2a7d2905586.ulm@gentoo \
    --to=ulm@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox