Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show conan virtualenv prompt #1734

Open
hacki11 opened this issue Jan 24, 2022 · 4 comments
Open

Show conan virtualenv prompt #1734

hacki11 opened this issue Jan 24, 2022 · 4 comments

Comments

@hacki11
Copy link

hacki11 commented Jan 24, 2022

Is it possible to show the virtualenv info from conan when activated?

It is similar to python venv, having activate and deactivate scripts.
conanfile.txt:

[requires]
cmake/3.22.0

image

https://docs.conan.io/en/latest/mastering/virtualenv.html

@prathikshetty2002
Copy link

Hi @hacki11 you may want to go through this documentation for conan :

https://docs.conan.io/en/latest/mastering/virtualenv.html

To check your virtualenv info try this : env_info

As you said it is similar to venv in python. You can activate/deacticvateb using the virtualrunenv generator that builds your virtual environment.

I hope the above documentation provided by me is helpful. Hope this resolves your query!

@hacki11
Copy link
Author

hacki11 commented Apr 8, 2022

Thank you for the hint, but the same link I already given in my issue :)

I know how Conan env works but I would like to know how to best integrate it into p10k to show it in cli like venv from python.

@prathikshetty2002
Copy link

Thank you for the hint, but the same link I already given in my issue :)

I know how Conan env works but I would like to know how to best integrate it into p10k to show it in cli like venv from python.

oh i get it. So you want to make your prompt display the venv you are into right?

you may want to get the result just like the below one:

Screenshot 2022-04-08 175005

@prathikshetty2002
Copy link

And if you want to customize your conan venv to display extra information you may want to write a config file in your shell profile your into. Just try out things , they always are a great learning. I too like experimenting with the setup thats how we develop the affinity towards open source <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants