implement pylist, fixes #2
Some checks failed
/ Lint Check Shellscripts (push) Failing after 32s

This commit is contained in:
Phani Pavan K
2026-02-06 12:50:27 +05:30
parent a8ecdb60a5
commit 0edc8467fd

9
penv
View File

@@ -19,6 +19,7 @@ usage() {
# echo " - setdef <name> - Use an existing environment as the default kernel" # echo " - setdef <name> - Use an existing environment as the default kernel"
echo " - activate <name> - Activates an existing environment (depricated, use pact)" echo " - activate <name> - Activates an existing environment (depricated, use pact)"
echo " - list - List available environments" echo " - list - List available environments"
echo " - pylist - List available PYTHON versions"
echo " - install - Initialize user's profile" echo " - install - Initialize user's profile"
echo " - uninstall - Remove ALL the environments installed using PENV" echo " - uninstall - Remove ALL the environments installed using PENV"
echo " - help - Print this message" echo " - help - Print this message"
@@ -28,6 +29,7 @@ usage() {
echo " - del -> rm" echo " - del -> rm"
# echo " - setdef -> sd" # echo " - setdef -> sd"
echo " - activate -> ac, act" echo " - activate -> ac, act"
echo " - pylist -> pyls"
echo " - list -> ls" echo " - list -> ls"
} }
@@ -177,6 +179,10 @@ uninstall() {
echo "Uninstalled PENV" 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 if [ "$#" -lt 1 ]; then
title title
usage usage
@@ -201,6 +207,9 @@ case "$cmd" in
list|ls) list|ls)
list list
;; ;;
pylist|pyls)
pyls
;;
help) help)
title title
usage usage