mirror of
https://github.com/oh-my-fish/theme-bobthefish.git
synced 2024-10-27 20:34:23 +00:00
added support for conda environments. (#150)
* added support for conda environments.
This commit is contained in:
parent
bf5f8c4cf4
commit
ed3ca3d618
@ -682,14 +682,18 @@ function __bobthefish_virtualenv_python_version -S -d 'Get current Python versio
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function __bobthefish_prompt_virtualfish -S -d "Display current Python virtual environment (only for virtualfish, virtualenv's activate.fish changes prompt by itself)"
|
function __bobthefish_prompt_virtualfish -S -d "Display current Python virtual environment (only for virtualfish, virtualenv's activate.fish changes prompt by itself) or conda environment."
|
||||||
[ "$theme_display_virtualenv" = 'no' -o -z "$VIRTUAL_ENV" ]; and return
|
[ "$theme_display_virtualenv" = 'no' -o -z "$VIRTUAL_ENV" -a -z "$CONDA_DEFAULT_ENV" ]; and return
|
||||||
set -l version_glyph (__bobthefish_virtualenv_python_version)
|
set -l version_glyph (__bobthefish_virtualenv_python_version)
|
||||||
if [ "$version_glyph" ]
|
if [ "$version_glyph" ]
|
||||||
__bobthefish_start_segment $color_virtualfish
|
__bobthefish_start_segment $color_virtualfish
|
||||||
echo -ns $virtualenv_glyph $version_glyph ' '
|
echo -ns $virtualenv_glyph $version_glyph ' '
|
||||||
end
|
end
|
||||||
echo -ns (basename "$VIRTUAL_ENV") ' '
|
if [ "$VIRTUAL_ENV" ]
|
||||||
|
echo -ns (basename "$VIRTUAL_ENV") ' '
|
||||||
|
else if [ "$CONDA_DEFAULT_ENV" ]
|
||||||
|
echo -ns (basename "$CONDA_DEFAULT_ENV") ' '
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function __bobthefish_prompt_virtualgo -S -d 'Display current Go virtual environment'
|
function __bobthefish_prompt_virtualgo -S -d 'Display current Go virtual environment'
|
||||||
|
Loading…
Reference in New Issue
Block a user