Open simonrouse9461 opened 1 year ago
If it's at all possible, I'd like a more general approach to putting conda init
output in a different file, as well; I'm a zsh user with a self-updating zshrc that would like to simply run conda init zsh -f ~/.zshrc.local
to prevent my own zshrc updates from clobbering it.
I'm willing to open another issue if needed, I just wasn't sure if it would be a duplicate of this one or not.
Hi @simonrouse9461 ,
Thanks for submitting this feature request. This sounds very reasonable and as @origintopleft mentioned, perhaps we could also expand this feature request to include other shell types too.
The project maintainers cannot promise when we would get around to developing such a feature, but pull requests are always welcome, and we will be happy to review them.
Create or update
$XDG_CONFIG_HOME/fish/conf.d/conda.fish
when runningconda init fish
instead of editing$XDG_CONFIG_HOME/fish/config.fish
in place.
@simonrouse9461 does this recently-merged fish
shell initialization PR adequately address what you mention above?
Hi @beeankha thank you for sharing this related PR. I think this PR doesn't address the same issue as I mentioned. This PR changes the content of the init script, but it doesn't change where conda places the script when calling conda init fish
.
Thanks for the clarification, @simonrouse9461 ! That helps me understand this currently-open issue better.
Checklist
What is the idea?
When running
conda init fish
, conda writes a block of init script to$XDG_CONFIG_HOME/fish/config.fish
for fish shell integration. However, fish has a better way of modularizing configurations, which is adding standalone scripts to$XDG_CONFIG_HOME/fish/conf.d/
. So, instead of parsing and editing$XDG_CONFIG_HOME/fish/config.fish
in place, it's easier and safer to create an$XDG_CONFIG_HOME/fish/conf.d/conda.fish
when runningconda init fish
.Why is this needed?
$XDG_CONFIG_HOME/fish/config.fish
is intended to be edited manually. For modular shell integrations,$XDG_CONFIG_HOME/fish/conf.d/
is a better place.What should happen?
Create or update
$XDG_CONFIG_HOME/fish/conf.d/conda.fish
when runningconda init fish
instead of editing$XDG_CONFIG_HOME/fish/config.fish
in place.Additional Context
No response