summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-12-03 13:17:17 +0100
committerMichał Górny <mgorny@gentoo.org>2017-12-03 13:20:13 +0100
commitc35ddadceeca65d617c3e1254d9c0a96dd9cfb5c (patch)
tree1540269c827561f06a73018eefd888fa5ce9ab1d
parentUpadate version to 20160516 (diff)
downloadeselect-python-c35ddadceeca65d617c3e1254d9c0a96dd9cfb5c.tar.gz
eselect-python-c35ddadceeca65d617c3e1254d9c0a96dd9cfb5c.tar.bz2
eselect-python-c35ddadceeca65d617c3e1254d9c0a96dd9cfb5c.zip
list: Mark uninstalled Pythons as such
Bug: https://bugs.gentoo.org/639578
-rw-r--r--python.eselect.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/python.eselect.in b/python.eselect.in
index 451529d..bfb126a 100644
--- a/python.eselect.in
+++ b/python.eselect.in
@@ -280,6 +280,7 @@ do_list() {
done
local all=( $(get_all_pythons ${filter}) )
+ local installed=( $(get_installed_pythons ${filter}) )
local preferred=( $(get_preferred_pythons ${filter}) )
local disabled=( $(get_disabled_pythons) )
@@ -288,6 +289,8 @@ do_list() {
for (( i = 0; i < ${#all[@]}; ++i )); do
if has "${all[i]}" "${disabled[@]}"; then
all[i]=$(highlight_marker "${all[i]}" "$(highlight_warning "(disabled)")")
+ elif ! has "${all[i]}" "${installed[@]}"; then
+ all[i]=$(highlight_marker "${all[i]}" "$(highlight_warning "(uninstalled)")")
elif ! has "${all[i]}" "${preferred[@]}"; then
all[i]=$(highlight_marker "${all[i]}" "(fallback)")
fi