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. ⬇️ Please click the □ reaction instead of leaving a +1 or □ commentįile "C:\Users\auneri1\Miniconda3\envs\shell2\lib\site-packages\xonsh\built_ins.py", line 571, in _run_binaryįile "C:\Users\auneri1\Miniconda3\envs\shell2\lib\subprocess.py", line 800, in _init_įile "C:\Users\auneri1\Miniconda3\envs\shell2\lib\subprocess.py", line 1207, in _execute_childįile "C:\Users\auneri1\Miniconda3\envs\shell2\lib\site-packages\xonsh\proc.py", line 1889, in _init_įile "C:\Users\auneri1\Miniconda3\envs\shell2\lib\site-packages\xonsh\built_ins.py", line 560, in runįile "C:\Users\auneri1\Miniconda3\envs\shell2\lib\site-packages\xonsh\built_ins.py", line 587, in _run_binary There seem to be other issues associated with this change - I'll file separate bugs for them. It was working fine prior to those changes. I recently upgraded from Python 3.7 to 3.8, as well as the Xonsh version from 0.8.x to 0.9.21. In fact, the text even changes color when I type 'rg' which shows that xonsh is recognizing this as a valid command in the path. The above is an example with ripgrep (rg). : xonsh: subprocess mode: command not found: rg Proc = n(pipeline_group=pipeline_group)įile "C:\Users\me\AppData\Roaming\Python\Python38\site-packages\xonsh\built_ins.py", line 550, in runįile "C:\Users\me\AppData\Roaming\Python\Python38\site-packages\xonsh\built_ins.py", line 577, in _run_binary Hp, ht, pid, tid = _winapi.CreateProcess(executable, args,įileNotFoundError: The system cannot find the file specifiedĭuring handling of the above exception, another exception occurred:įile "C:\Users\me\AppData\Roaming\Python\Python38\site-packages\xonsh\proc.py", line 1889, in _init_ Self._execute_child(args, executable, preexec_fn, close_fds,įile "c:\program files\python38\lib\subprocess.py", line 1307, in _execute_child P = self.cls(self.cmd, bufsize=bufsize, **kwargs)įile "C:\Users\me\AppData\Roaming\Python\Python38\site-packages\xonsh\proc.py", line 584, in _init_įile "c:\program files\python38\lib\subprocess.py", line 854, in _init_ Xonsh: To log full traceback to a file set: $XONSH_TRACEBACK_LOGFILE = įile "C:\Users\me\AppData\Roaming\Python\Python38\site-packages\xonsh\built_ins.py", line 561, in _run_binary
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |