mirror of
https://github.com/prdlk/television.git
synced 2026-11-02 13:12:51 +00:00
20 lines
632 B
TOML
20 lines
632 B
TOML
[metadata]
|
|||
|
|
name = "python-venvs"
|
||
|
|
description = "Find Python virtual environments"
|
||
|
|
requirements = ["find"]
|
||
|
|
|
||
|
|
[source]
|
||
|
|
command = "find ~ -maxdepth 5 -type f -name 'pyvenv.cfg' 2>/dev/null | xargs -I{} dirname {}"
|
||
|
|
|
||
|
|
[preview]
|
||
|
|
command = "cat '{}/pyvenv.cfg' 2>/dev/null && echo '' && echo 'Packages:' && '{}/bin/pip' list --format=columns 2>/dev/null | head -20"
|
||
|
|
|
||
|
|
[actions.activate]
|
||
|
|
description = "Open a shell with the selected venv activated"
|
||
|
|
command = "source '{}/bin/activate' && $SHELL"
|
||
|
|
mode = "execute"
|
||
|
|
|
||
|
|
[actions.packages]
|
||
|
|
description = "List all packages in the selected venv"
|
||
|
|
command = "'{}/bin/pip' list | less"
|
||
|
|
mode = "execute"
|