custom venv_dir

This commit is contained in:
tavo 2024-12-24 23:29:03 -06:00
parent b36b8cc2be
commit 7264fc8d86
2 changed files with 9 additions and 3 deletions

7
pyv
View file

@ -1,7 +1,5 @@
#!/bin/sh
# Copyright (C) 2024 Tavo
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
@ -14,6 +12,9 @@
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <https://www.gnu.org/licenses/>.
# Set a custom VENV_DIR
#VENV_DIR="$HOME/myvenvs"
_pyv_err() {
printf '\033[91mError:\033[0m \033[2m%s\033[0m\n' "$1"
}
@ -151,3 +152,5 @@ pyv() {
esac
fi
}
# Copyright (C) 2024 Tavo

View file

@ -1,6 +1,7 @@
#!/usr/bin/env bash
# Copyright (C) 2024 Tavo
# Set a custom VENV_DIR
#VENV_DIR="$HOME/myvenvs"
_pyv_comp() {
if [ -z "$VENV_DIR" ] ; then
@ -28,3 +29,5 @@ _pyv_comp() {
}
complete -F _pyv_comp pyv
# Copyright (C) 2024 Tavo