mirror of
https://github.com/IlanCosman/tide.git
synced 2024-09-11 09:05:37 +03:00
Handle virtualenv names without -
This commit is contained in:
parent
44c521ab29
commit
6a693fd928
@ -9,7 +9,7 @@ function _tide_item_python
|
||||
# pipenv $VIRTUAL_ENV looks like /home/ilan/.local/share/virtualenvs/pipenv_project-EwRYuc3l
|
||||
# Detect whether we are using pipenv by looking for 'virtualenvs'. If so, remove the hash at the end.
|
||||
if test "$dir" = virtualenvs
|
||||
string match -qr "(?<base>.*)-.*" $base
|
||||
string match -qr "(?<base>[^/-]*)" $base
|
||||
_tide_print_item python $tide_python_icon' ' "$v ($base)"
|
||||
else if contains -- "$base" virtualenv venv .venv env # avoid generic names
|
||||
_tide_print_item python $tide_python_icon' ' "$v ($dir)"
|
||||
|
Loading…
Reference in New Issue
Block a user