From: "Vadim A. Misbakh-Soloviov" <mva@mva.name>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/zsh-completion:master commit in: src/
Date: Tue, 28 Apr 2015 14:56:00 +0000 (UTC) [thread overview]
Message-ID: <1430232939.9737be28efe8cf3668d4f0625382f9184db4c49a.mva@gentoo> (raw)
commit: 9737be28efe8cf3668d4f0625382f9184db4c49a
Author: Vadim A. Misbakh-Soloviov <git <AT> mva <DOT> name>
AuthorDate: Tue Apr 28 14:55:39 2015 +0000
Commit: Vadim A. Misbakh-Soloviov <mva <AT> mva <DOT> name>
CommitDate: Tue Apr 28 14:55:39 2015 +0000
URL: https://gitweb.gentoo.org/proj/zsh-completion.git/commit/?id=9737be28
_gentoo_repos: some algo rework. Probably fixes #3
Signed-off-by: Vadim A. Misbakh-Soloviov <git <AT> mva.name>
src/_gentoo_repos | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/src/_gentoo_repos b/src/_gentoo_repos
index 7f88a64..85f3936 100644
--- a/src/_gentoo_repos
+++ b/src/_gentoo_repos
@@ -6,9 +6,12 @@
# _gentoo_repos -o -> returns the list of non-main repos
_gentoo_repos() {
- local main_repo main_repo_path overlay overlay_paths
+ local main_repo main_repo_path overlay overlay_paths result
- if [[ -e /usr/share/portage/config/repos.conf ]]; then
+ overlay_paths=();
+ result=();
+
+ if [[ -e /usr/share/portage/config/repos.conf || -e /etc/portage/repos.conf ]]; then
main_repo=$(_repos_conf DEFAULT main-repo)
main_repo_path=$(_repos_conf ${main_repo} location)
@@ -30,16 +33,20 @@ _gentoo_repos() {
fi
if [[ $1 == "-m" ]]; then
- echo "${main_repo_path}"
+ result+=(${main_repo_path})
elif [[ $1 == "-o" ]]; then
- echo "${(@u)overlay_paths}"
+ result+=(${(@)overlay_paths})
else
- echo "${main_repo_path} ${(@u)overlay_paths}"
+ result+=(${main_repo_path} ${(@)overlay_paths})
fi
+
+ echo ${(u)result}
}
_repos_conf() {
- local v file insection section arr
+ local v file insection section arr secname
+
+ secname=();
for file in /usr/share/portage/config/repos.conf \
/etc/portage/repos.conf \
@@ -74,7 +81,7 @@ _repos_conf() {
done
if [[ ${1} == "-l" ]]; then
- echo "${(@)secname}"
+ echo "${(@u)secname}"
else
echo "${v}"
fi
next reply other threads:[~2015-04-28 14:56 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-28 14:56 Vadim A. Misbakh-Soloviov [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-07-08 19:25 [gentoo-commits] proj/zsh-completion:master commit in: src/ Mike Gilbert
2023-01-17 14:45 Vadim Misbakh-Soloviov
2022-01-12 9:35 Vadim Misbakh-Soloviov
2022-01-12 9:35 Vadim Misbakh-Soloviov
2020-09-14 3:13 Vadim Misbakh-Soloviov
2020-09-14 3:13 Vadim Misbakh-Soloviov
2020-09-14 3:13 Vadim Misbakh-Soloviov
2020-09-14 3:13 Vadim Misbakh-Soloviov
2020-02-19 18:51 Vadim Misbakh-Soloviov
2020-02-19 18:47 Vadim Misbakh-Soloviov
2020-02-19 18:47 Vadim Misbakh-Soloviov
2020-02-19 18:47 Vadim Misbakh-Soloviov
2020-02-19 18:47 Vadim Misbakh-Soloviov
2020-02-19 18:47 Vadim Misbakh-Soloviov
2020-02-19 17:53 Vadim Misbakh-Soloviov
2020-02-19 17:53 Vadim Misbakh-Soloviov
2020-02-19 17:53 Vadim Misbakh-Soloviov
2015-04-28 12:07 Vadim A. Misbakh-Soloviov
2015-04-28 12:07 Vadim A. Misbakh-Soloviov
2014-12-22 22:57 Tim Harder
2014-12-21 9:51 Tim Harder
2014-12-21 9:51 Tim Harder
2014-12-20 23:22 Tim Harder
2014-12-20 22:29 Tim Harder
2014-12-20 20:04 Tim Harder
2014-12-20 20:04 Tim Harder
2014-12-20 20:04 Tim Harder
2014-12-20 5:31 Tim Harder
2014-12-20 4:54 Tim Harder
2014-12-20 4:39 Tim Harder
2014-12-20 4:39 Tim Harder
2014-12-20 3:21 Tim Harder
2014-12-20 3:08 Tim Harder
2014-12-20 3:08 Tim Harder
2014-12-20 3:08 Tim Harder
2014-12-20 2:35 Tim Harder
2014-12-20 2:15 Tim Harder
2014-12-20 2:15 Tim Harder
2014-12-18 16:59 Tim Harder
2014-12-18 16:59 Tim Harder
2014-12-18 16:59 Tim Harder
2014-12-01 7:48 Tim Harder
2014-12-01 7:48 Tim Harder
2014-12-01 7:34 Tim Harder
2014-12-01 7:34 Tim Harder
2014-11-27 7:23 Tim Harder
2014-11-27 7:23 Tim Harder
2014-11-27 6:39 Tim Harder
2014-11-24 9:13 Vadim A. Misbakh-Soloviov
2014-11-24 7:33 Tim Harder
2014-11-24 7:33 Tim Harder
2014-11-23 21:35 Vadim A. Misbakh-Soloviov
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=1430232939.9737be28efe8cf3668d4f0625382f9184db4c49a.mva@gentoo \
--to=mva@mva.name \
--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