* args: accept --rc dir to load dir/*.xsh
* test_main: add a test for --rc dir
* args: drop unused --config-path, not read anywhere
* news: add entry for rcdir changes
* xonshrc_context: return loaded instead of context, don't touch env
This function returned the context, but the return value is not used by
the sole call site (and would inconsistently be either the env or ctx
depending on other arguments). Redefine the function to return what was
loaded.
The function will also no longer touch the environment variables
XONSHRC, XONSHRC_DIR or LOADED_RC_FILES.
* XonshSession: add rc_files list, and set in start_services
* LOADED_RC_FILES: drop completely
* xonfig: add RC files
* test_main: update tests for changes to XONSHRC{,_DIR}
* news: add entry for xonshrc changes
* Use full paths when launching processes on Windows
Addresses issue #3763.
* Add news item
* Suppress stderr from "which"
* Replace xonsh.xoreutils.which with shutil.which
* Use existing resolved binary location
* Ensure PATHEXT mock is not overwritten
* Add tests for running excutables on windows
* Ensure we don't set overwrite command when binary_loc is none
* tweak tests
* Revert "Ensure PATHEXT mock is not overwritten"
This reverts commit ce5d6ac091.
* Use monkeypatch for chdir
Co-authored-by: Morten Lund <melund@gmail.com>
* code simplifications
* add blank news item
There seems to be a CI check that requires this for each PR, But this
seems like it shouldn't be included in the next release notes, so I'm
leaving it blank.
* Add ends_with_colon_token tool
* Add execer test for comment ending with a colon
* Use ends_with_colon_token() to catch non-indented blocks in execer
* Use ends_with_colon_token() for automatic indentation in prompt_toolkit and readline
* Add news
* Address ON_WSL() bug #4310
Solution for #4310
`return "microsoft" in platform.release().lower() # might be a better solution?`
`return "wsl" in platform.release().lower() # might be a better solution?`
* Addressed #4310 - Added output for ON_WSL
For some reason this wasn't included in the output when running `xonfig`
Perhaps this was on purpose, but wsl is pretty popular and cygwin is detected so I figure I'd address that
* only display "on wsl" field if we detect linux
* Corrected import
* added news entry
* minor clarification in news entry
* Update news/fix_wsl_detection.rst
Co-authored-by: Gil Forsyth <gforsyth@users.noreply.github.com>
* Update news/fix_wsl_detection.rst
Co-authored-by: Gil Forsyth <gforsyth@users.noreply.github.com>
* This should pass CI tests
Co-authored-by: Gil Forsyth <gforsyth@users.noreply.github.com>
* chore: adding py310 to ci
though this will require code/parser changes, this is to prepare for
upcoming adoption
* fix: set python version as string
* fix: reference to master -> main
* fix: coverage is not reported in master
- disable amalgamation
1. during coverage report tests
2. qa tools like mypy may follow imports
- use python 3.9 for coverage and qa report. since it will have more
coverage and better typing support
* chore: use py3.10 with setup-py action
* chore: add news-item check job
* fix: py3.10 error while starting
the match statement is not supported.
while the syntax support is only upto py3.8
* fix: news-item checker
* chore: enable fail report for py310 tests
* test: add test for ptk_shell
* tests: Run tests with the amalgamated xonsh
* tests: Test xonsh loads correctly interactively
* tests: Ensure tests run from amalgamated xonsh
* environ: Separate $XONSH_DEBUG and $XONSH_NO_AMALGAMATE
* tests: Keep XONSH_NO_AMALGAMATE in a comment for ease of debugging
* tests: Fix monkeypatch for amalgamated code
* test_main: test lots of startup order combinations
This is based on the startup order described in
https://github.com/xonsh/xonsh/issues/4096#issuecomment-791991841
and adds an (ugly) parameterised test which tries lots of different
CLI combinations, and verifies which RC files (if any) get loaded,
and in what order.
* test_script_startup: skip on windows
* ast: Fix annotated assignment
* ast: Support annotated variable without a value
* tests: Test annotated assign statements
* news: Add annotated-assignment
* Add support for rc.d drop-in configuration directories
* main: change how --rc, --no-rc are handled
Explicitly pass --no-rc rather than signalling it as an empty --rc, to
indicate that we should suppress both XONSHRC and XONSHRCDIR in that
case.
* Rename XONSHRCDIR -> XONSHRC_DIR
* xonshrc_context: document setting env for XONSHRC_DIR
* main: --rc foo.xsh should suppress XONSHRC_DIR
* Add saving current working directory (cwd) to the history
* Added XONSH_HISTORY_SAVE_CWD and create PromptHistorySetting section
* news
* Move dummy history to the distinct file
* tests
* tests
Co-authored-by: a <a@a.a>