9/9/2023 0 Comments Xonsh configuration![]() ![]() update aliases with the xonshrc results.update aliases with the bash-loaded ones, if necessary.if the IMPORT_BASH_ALIASES environment variable is True, load the bash aliases.run the xonshrc, loading the results into a different dict.Would it not be possible to preserve the resolution order from above, even if the aliases aren't loaded in that order? That is, could we: One workaround would be to create a second script with a different name that starts up with the -no-load-bash-aliases option, but that seems like a big kludge. The downside here would be that I'm not sure it would work with xonsh as the default shell (via chsh) that is, I'm not sure one could set the default shell to be, e.g., /usr/local/bin/xonsh -no-load-bash-aliases. These would simply set the environment and I discussed this a little bit earlier in the thread. ![]() Add -load-bash-aliases and -no-load-bash-aliases to the xonsh argument parser.(3) seems like it is adding yet another another config file, but is otherwise clean. (2) seems like it could be annoying to use all the time. (1) seems a little hacky but would work now. I don't think that this is the last time such a situation will arise, so it would be nice to have good strategy. have a xonsh environment config file file, possibly in JSON, that can be used to set environment variables as the last step in the _env() function.These would simply set the environment variable. We read in bashrc before aliases, so this is actually another run control file for us. have folks export LOAD_BASH_ALIASES='' in their bashrc.From here, there are three options I see, one or all of them should be supported. ![]() So the challenge becomes setting the env variable before alias resolution, which makes xonshrc impossible. We should not change the order of alias resolution that described. There should be an environment variable that controls this behaviour, maybe $LOAD_BASH_ALIASES. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |