-
Notifications
You must be signed in to change notification settings - Fork 2k
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
conda environment not displaying #1056
Comments
As we currently do not use the original prompt, you have to add conda information yourself: Add a file called ---
-- Find out current conda env
-- @return {false|conda env name}
---
function get_conda_env()
env_path = clink.get_env('CONDA_DEFAULT_ENV')
if env_path then
basen = basename(env_path)
return basen
end
return false
end
---
-- add conda env name
---
function conda_prompt_filter()
-- add in conda env name
local conda_env = get_conda_env()
if conda_env then
clink.prompt.value = string.gsub(clink.prompt.value, "{lamb}", "["..conda_env.."] {lamb}")
end
end
clink.prompt.register_filter(conda_prompt_filter, 20) |
At the point this runs, the "{lamb}" has already been replaced with "λ". To get it working, I replaced: with: Full lua I ended up with:
|
Please try #1070 for a version which parses the original prompt. |
the conda env, usually looks like
(dev) c:\dev\code (master)
is missing from version 1.30 full distribution
The text was updated successfully, but these errors were encountered: