Closed hmiladhia closed 2 years ago
Hi @hmiladhia, thanks for your contribution!
I only had a quick look at the proposed changes, so please correct me if I have it wrong: you create an auxiliary variable named REGEX
to keep the code clean, right? Said variable is therefore only used in that snippet of code. If so, please declare it local
and (if I remember the coding style right) change it to lower case lettering to visually separate it from environment variables.
It's nice seeing new contributors! Remember to add yourself to the authors file if you like with a quick description of your contribution :) https://github.com/andresgongora/synth-shell-prompt/blob/master/AUTHORS.md
Hi @andresgongora, thank your for your feedback !
I adjusted the regex variable naming style and declared it as local ✌🏼.
When creating a python environment, you can explicitly specify a name:
In this case, the environment name is
environment_name
and not the directory name.venv
.In this PR, I attempt to retrieve the actual environment name from the
.venv/bin/activate
bash script using regex, if it fails revert to the directory name.