Andy Kipp
9618fa2a36
Added casting CommandPipeline to int, hash, str ( #4205 )
...
* cast
* test
* added tests and str
* news
* test
* skip windows
* docs
* docs
* tests
Co-authored-by: a <a@a.a>
2021-03-30 13:36:01 -04:00
bhawkins
7168b262ae
Fix garbage collection of JSON history specified in seconds. ( #4098 )
...
* Fix garbage collection of JSON history specified in seconds.
* Add news entry.
* Avoid possible off-by-one error
* Make size_over return value easier to reason about.
* Update gc_seconds test cases.
Co-authored-by: bhawkins <bhawkins@github.com>
2021-03-22 16:20:36 -04:00
Andy Kipp
8ad8b043e8
feat: Added ability to set XONSH_HISTORY_FILE ( #4175 )
...
* Added ability to set XONSH_HISTORY_FILE before loading the history backend.
* black
* using XONSH_HISTORY_FILE
* tests
* black
* Convert WindowsPath to str
* Update xonsh/environ.py
Co-authored-by: Gil Forsyth <gforsyth@users.noreply.github.com>
* cleaning
* test sqlite
* test dummy
* typo
* fix 3.6
Co-authored-by: a <a>
Co-authored-by: Gil Forsyth <gforsyth@users.noreply.github.com>
2021-03-16 17:07:11 -04:00
Noorhteen Raja NJ
b7b2c9a916
fix: abbrevs with callback alters buffer text before expansion ( #4156 )
...
* fix: abbrevs with callback alters buffer text before expansion
fixes #3642
* docs: add news item
2021-03-09 09:07:53 -05:00
Gil Forsyth
9bb91a0b4b
Cleanup remaining vended ptk bits ( #4130 )
2021-03-01 16:55:23 -05:00
Noorhteen Raja NJ
a5522dbb1e
Remove vended ptk ( #4107 )
...
* refactor: remove vended_ptk from project
* refactor: handle removal of ptk vendoring
* refactor: update usage of os.scandir
* fix: update incorrect import xonsh.platform.scandir
* test: update os.scandir
* test: update tests that check ptk version matrix
* fix: add missing import ctypes
2021-03-01 11:56:32 -05:00
Noorhteen Raja NJ
c2d5e60799
Py39 support ( #4101 )
...
* fix: handle ast.Index and ast.ExtSlice change while Parsing
related to #4100 , #4099 , #4068 , #4038 , #4028 , #4005 ,
* fix: py39 raises when lineno & col not given
TypeError: required field "col_offset" missing from keyword
* fix: tuple inside scbscriptor support for py39
* chore: enable py39 ci checks
they were silently failing before
* test: a backlog test for attributes inside subscriptors
this would require debugging deep into the ply parser methods.
* docs: add news item
* test: skip test_rc_with_modified_path on windows
* Update tests/test_parser.py
Co-authored-by: Gil Forsyth <gforsyth@users.noreply.github.com>
* test: mark failing tests for py39 parser
Co-authored-by: Gil Forsyth <gforsyth@users.noreply.github.com>
2021-02-17 12:31:33 -05:00
Noorhteen Raja NJ
d50cf32f84
Feat abbrevs callback ( #4031 )
...
* feat: support callbacks in abbrevs dict
facilitate solving problems like #3642
fixes #3642
* test: add tests for abbrevs and news item
* fix: mypy error
* refactor: update imports for xontrib_meta module
2021-01-29 12:18:22 -05:00
Aneesh Durg
1f7f33c93f
Add $HISTCONTROL=ignorespace support ( #4062 )
...
* Add $HISTCONTROL=ignorespace support
* Add news and fix formatting
* Move ignore space to happend in append and fix test bugs
* invert conditional
* remove leftover debug info
2021-01-25 16:37:29 -05:00
Danny Sepler
97cb072f9f
Add a better test suite for "vc.py", and fix "include_untracked" logic ( #4041 )
...
* move test_prompt to test_base
* move test_prompt to test_vc
* revamp test_vc file
* Add VC_GIT_INCLUDE_UNTRACKED variable, move test_prompt.py to test_base.py
* reduce test_base
2021-01-05 09:26:19 -05:00
Asaf Fisher
da415caf06
Add 'dict' merging operation for the aliases class ( #4037 )
...
* aliases: Add merging operation to the aliases dict
* tests: Add tests to the aliases merging operation
* news: Add summary about the Alias merging functionality
2021-01-04 12:44:21 -05:00
Leandro Emmanuel Reina Kiperman
e7e6fd90a7
Edit sys.path while loading RC files (squashed) ( #3950 )
2021-01-04 12:31:05 -05:00
Noorhteen Raja NJ
bceaafae4d
Add groups to env vars ( #4026 )
...
* feat: add grouped-settings for env variables
fixes #4014
style: fix mypy errors
chore: update testing requirements versions
fix: update xonsh.tools import error
* chore: add news item
* fix: update Var.with_default handling env defaults
* fix: set env var.doc_default=DefaultNotGiven
there is a custom handler for it
* chore: update travis
speedup docs generation
* chore: add command to serve docs during development
* docs: add jinja2 helpers/renderers extension for sphinx
* docs: update envvars document
* docs: fix docs failing
* Update xonsh/environ.py
commit suggestion
Co-authored-by: Gil Forsyth <gforsyth@users.noreply.github.com>
* Update xonsh/environ.py
Co-authored-by: Gil Forsyth <gforsyth@users.noreply.github.com>
* Update xonsh/environ.py
Co-authored-by: Gil Forsyth <gforsyth@users.noreply.github.com>
* Update xonsh/environ.py
Co-authored-by: Gil Forsyth <gforsyth@users.noreply.github.com>
* Update xonsh/environ.py
Co-authored-by: Gil Forsyth <gforsyth@users.noreply.github.com>
* Update xonsh/environ.py
Co-authored-by: Gil Forsyth <gforsyth@users.noreply.github.com>
* refactor: update rst-extension
Co-authored-by: Gil Forsyth <gforsyth@users.noreply.github.com>
2021-01-04 12:21:44 -05:00
Anthony Scopatz
17f86d359e
callable default skips validation ( #3668 )
...
* callable default skips validation
* default value
* black
* today func
* store called defaults
2020-12-18 14:42:18 -05:00
Noorhteen Raja NJ
a083d28461
Completer py api ( #4018 )
...
* feat: add index to sqlite-history table
* feat: support style argument to RichCompletion object
this will enable setting style for ptk completers
* feat: add xonsh cli/argparser utils
* feat: add python api for adding/removing completers
fixes #3972
* fix: mypy error
* docs: add api doc
* fix: circular imports
* docs:
* fix: testing get-doc cross-platform
* Update xonsh/completers/_aliases.py
Co-authored-by: Gil Forsyth <gforsyth@users.noreply.github.com>
* Update xonsh/completers/_aliases.py
Co-authored-by: Gil Forsyth <gforsyth@users.noreply.github.com>
* style: convert % to f-strings
Co-authored-by: Gil Forsyth <gforsyth@users.noreply.github.com>
Co-authored-by: Gil Forsyth <gforsyth@users.noreply.github.com>
2020-12-16 14:26:22 -05:00
Noorhteen Raja NJ
5ea2ae4f8f
refactor: rewrite xontribs/jedi.xsh -> xontribs/jedi.py to take advan… ( #3965 )
...
* refactor: rewrite xontribs/jedi.xsh -> xontribs/jedi.py to take advantage of python tooling
* chore: update elm ci workflow
* test: update test for jedi xontrib
2020-11-23 16:21:43 -05:00
Dominic Ward
aa7279b987
Path complete given path literal ( #3828 )
...
* Support path completion from path literal
* Test path completion when prefix is partial p-string
* Update news
* Update news
* fix test: expect string literal
* Support completion of raw-path strings
* Resolve raw-string issues when testing on Windows
* Simplify p-string prefix checks
* Fix test
* Update news
* fix news: rst
* Use raw path string to simplify test
* Test path from partial string
* Try case sensitive completion
2020-11-16 09:46:42 -05:00
Anthony Scopatz
913077b0b0
Merge pull request #3960 from jnoortheen/use-individual-file-for-xontrib-meta
...
Use individual file for xontrib meta
2020-11-10 14:44:41 -06:00
Noortheen Raja
2b947e9e66
refactor: replace xontribs.json with xontribs_meta.py
...
closes #3931
2020-11-10 22:12:27 +05:30
Anthony Scopatz
4087fc95a8
Merge pull request #3925 from daniel-shimon/command-pipeline-raw-out
...
procs: Add CommandPipeline.raw_out for retreival of the raw stdout bytes
2020-11-10 10:07:27 -06:00
Anthony Scopatz
996892aec8
Merge pull request #3933 from dyuri/ptk_support_for_themes
...
PTK support for custom themes (second try)
2020-11-09 22:09:06 -06:00
Daniel Shimon
97d076855b
procs: Allow bytes
objects in the @()
operator
2020-11-06 18:33:27 +02:00
Daniel Shimon
fb9b5eb709
procs: Add CommandPipeline.raw_out and raw_err for retreival of the raw stdout/err bytes
2020-11-06 15:38:34 +02:00
Bob Hyman
b44dc70af7
Add $COMPLETION_MODE='menu-complete' to enable readline menu-complete ( #3876 )
...
* Add $COMPLETION_MODE='menu-complete' to enablereadline menu-complete -like behavor in completion.
* Tests
Co-authored-by: Bob Hyman <bob.hyman@bobssoftwareworks.com>
2020-11-05 16:12:15 -05:00
Gyuri Horak
e2701cb134
ansi color fix + unit tests extended with new (non-pygments) values
2020-10-27 17:28:19 +01:00
Gyuri Horak
31dd811ef0
re-apply original changes
2020-10-27 15:23:58 +01:00
Anthony Scopatz
f99bfe1c94
Revert "PTK support for custom themes"
2020-10-26 10:48:00 -05:00
Gyuri Horak
68504b6ec5
master merge
2020-10-25 18:17:45 +01:00
Anthony Scopatz
25099360f8
Merge pull request #3923 from jnoortheen/update-test-vc-branch
...
test: update vc-branch test. default branch could be main as well
2020-10-23 17:07:08 -05:00
Gyuri Horak
39b2a50e7d
style override support for readline/ansi
2020-10-23 17:10:54 +02:00
Gyuri Horak
f18f45bcab
color_token_by_name
behaves strangely in unit tests, color name related test removed
2020-10-23 16:54:34 +02:00
Gyuri Horak
07217abc45
pygments.Token != xonsh.ptk_shell.Token
2020-10-23 16:32:44 +02:00
Gyuri Horak
89b6253c14
PTK style overrides without pygments
2020-10-23 16:04:57 +02:00
David Strobach
1ee8e38fba
Merge pull request #3677 from daniel-shimon/exec-aliases-on-io-operators
...
Create ExecAlias for aliases that contain IO operators
2020-10-23 15:18:01 +02:00
Daniel Shimon
cf87c2fdc8
aliases: Create ExecAlias for aliases that contain IO operators
2020-10-23 15:45:31 +03:00
Noortheen Raja
c4ee058e6e
test: update vc-branch test. default branch could be main as well
2020-10-23 17:58:34 +05:30
Anthony Scopatz
c18b3e1ca9
Merge pull request #3913 from anki-code/commands_cache_speed
...
Reading the directory from PATH and the symlink to this directory from PATH only once while create CommandCache
2020-10-21 08:59:01 -05:00
a
982ce976ec
fix
2020-10-21 03:52:31 +03:00
Anthony Scopatz
3afd5430a0
Procs Initial Refactor ( #3897 )
...
* refectored builtins
* refectored posix and readers
* refectored posix and readers
* proxies
* pipelines
* basic procs import cleanup
* fixed / refactored tests
* procs docs
* amalgamate
* XONSH_DEBUG=1 in tests
* exclude xonsh.procs mypy
* Use `pip install` instead of `python setup.py install`
* Update docs/api/procs/pipelines.rst
Co-authored-by: Gil Forsyth <gforsyth@users.noreply.github.com>
Co-authored-by: Gil Forsyth <gil@forsyth.dev>
Co-authored-by: Gil Forsyth <gforsyth@users.noreply.github.com>
2020-10-20 10:21:11 -04:00
anki-code
3e59c45653
xonfig xontribs ( #3894 )
...
* xonfig xontribs
* news
* news
* black
* v2
* v2
* v2
* simpler condition
* xontribs_loaded
* isinstance
* test
* v3
Co-authored-by: a <a>
2020-10-19 11:48:55 -04:00
David Strobach
164e2fd728
Merge pull request #3883 from xonsh/get-repo-url
...
get_repo_url() test
2020-10-16 18:34:16 +02:00
Gyuri Horak
120fc0a154
merge with upstream
2020-10-14 15:09:24 +02:00
Gyuri Horak
a2213d614c
unit tests for xonsh.tools.register_custom_style
2020-10-14 15:03:30 +02:00
Anthony Scopatz
8fada74d64
get_repo_url() test
2020-10-13 16:33:53 -05:00
Gyuri Horak
4076ee1177
pyghooks.register_custom_style
renamed to pyghooks.register_custom_pygments_style
to avoid confusion
2020-10-13 22:21:27 +02:00
Gyuri Horak
10a21aa9b9
unit tests for register_custom_ansi_style
2020-10-13 21:48:47 +02:00
Gyuri Horak
024021882c
unit test for custom theme registration
2020-10-12 17:30:54 +02:00
Noortheen Raja
a930134ccf
fix: env handle optional values
...
handle None value for ASYNC_PROMPT_THREAD_WORKERS
fixes #3858
2020-10-10 22:14:30 +05:30
a
d88fdc6609
simple_random_choice
2020-10-09 22:08:10 +03:00
a
87ce6bfc4d
test
2020-10-09 19:12:48 +03:00