1
0
Fork 0

Improved mkvenv

master
Mark 2022-07-09 08:52:29 -07:00
parent 5a08a0d681
commit 596b6a4a1d
Signed by: Mark
GPG Key ID: AD62BB059C2AAEE4
1 changed files with 7 additions and 3 deletions

View File

@ -16,15 +16,18 @@ function mkvenv \
# mkvenv <path> <prompt>: make venv at path and set prompt. # mkvenv <path> <prompt>: make venv at path and set prompt.
if test (count $argv) -eq 2 if test (count $argv) -eq 2
mkvenv $argv[1] echo -n "Making virtualenv at "
set_color green
echo -n "Set venv prompt to " echo -n $argv[1]
set_color normal
echo -n " with prompt "
set_color "green" set_color "green"
echo -n $argv[2] echo -n $argv[2]
set_color normal set_color normal
echo echo
python -m venv --prompt=$argv[2] $argv[1] python -m venv --prompt=$argv[2] $argv[1]
else if test (count $argv) -eq 1 else if test (count $argv) -eq 1
echo -n "Making virtualenv at " echo -n "Making virtualenv at "
set_color green set_color green
@ -33,6 +36,7 @@ function mkvenv \
echo echo
python -m venv $argv[1] python -m venv $argv[1]
else else
echo "Invalid number of arguments." echo "Invalid number of arguments."
end end