From 0edc8467fda3e34c74463859f2535b00b60f581c Mon Sep 17 00:00:00 2001 From: Phani Pavan K Date: Fri, 6 Feb 2026 12:50:27 +0530 Subject: [PATCH] implement pylist, fixes #2 --- penv | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/penv b/penv index fe0e68b..0fcf4c0 100755 --- a/penv +++ b/penv @@ -19,6 +19,7 @@ usage() { # echo " - setdef - Use an existing environment as the default kernel" echo " - activate - Activates an existing environment (depricated, use pact)" echo " - list - List available environments" + echo " - pylist - List available PYTHON versions" echo " - install - Initialize user's profile" echo " - uninstall - Remove ALL the environments installed using PENV" echo " - help - Print this message" @@ -28,6 +29,7 @@ usage() { echo " - del -> rm" # echo " - setdef -> sd" echo " - activate -> ac, act" + echo " - pylist -> pyls" echo " - list -> ls" } @@ -177,6 +179,10 @@ uninstall() { echo "Uninstalled PENV" } +pyls(){ + ls /usr/bin/python3.* /usr/local/bin/python3.* 2> /dev/null | tr " " "\n" | grep "3.*" --color=always +} + if [ "$#" -lt 1 ]; then title usage @@ -201,6 +207,9 @@ case "$cmd" in list|ls) list ;; + pylist|pyls) + pyls + ;; help) title usage