aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2009-09-19 05:42:06 +0000
committerUlrich Müller <ulm@gentoo.org>2009-09-19 05:42:06 +0000
commit9fd03936f3e3395d82d690fd7426425296f2a1c2 (patch)
tree06e5fa1c4a065e7f4dc1d7afc393dd3b3325dbb9 /modules/kernel.eselect
parentRename a variable. (diff)
downloadeselect-9fd03936f3e3395d82d690fd7426425296f2a1c2.tar.gz
eselect-9fd03936f3e3395d82d690fd7426425296f2a1c2.tar.bz2
eselect-9fd03936f3e3395d82d690fd7426425296f2a1c2.zip
New -m option for function write_numbered_list.
svn path=/trunk/; revision=661
Diffstat (limited to 'modules/kernel.eselect')
-rw-r--r--modules/kernel.eselect19
1 files changed, 7 insertions, 12 deletions
diff --git a/modules/kernel.eselect b/modules/kernel.eselect
index 819cd33..fa6c830 100644
--- a/modules/kernel.eselect
+++ b/modules/kernel.eselect
@@ -82,19 +82,14 @@ describe_list() {
}
do_list() {
- local targets=( $(find_targets) )
+ local i targets=( $(find_targets) )
write_list_start "Available kernel symlink targets:"
- if [[ ${#targets[@]} -gt 0 ]] ; then
- local i
- for (( i = 0; i < ${#targets[@]}; i++ )) ; do
- [[ ${targets[i]} = \
- $(basename "$(canonicalise "${EROOT}/usr/src/linux")") ]] \
- && targets[i]=$(highlight_marker "${targets[i]}")
- done
- write_numbered_list "${targets[@]}"
- elif [[ ${ESELECT_OUTPUT_MODE} != brief ]]; then
- write_kv_list_entry "(none found)" ""
- fi
+ for (( i = 0; i < ${#targets[@]}; i++ )) ; do
+ [[ ${targets[i]} = \
+ $(basename "$(canonicalise "${EROOT}/usr/src/linux")") ]] \
+ && targets[i]=$(highlight_marker "${targets[i]}")
+ done
+ write_numbered_list -m "(none found)" "${targets[@]}"
}
### set action ###