Commit graph

7 commits

Author SHA1 Message Date
Noorhteen Raja NJ
e03bda413a
Fix argparser (#5421)
fixed the issue caused by regression 


## For community
⬇️ **Please click the 👍 reaction instead of leaving a `+1` or 👍
comment**
2024-05-16 16:31:05 +05:30
Noorhteen Raja NJ
888cb819c9
history transfer (#4604)
* refactor: update `history gc` cli usage

* feat: added `history transfer` command

cli-utils now provides hook to parser.add_argument call

* test: test refactor

* docs:

* fix: mypy error

* fix: remove debug line
2021-12-20 08:36:29 +05:30
Noorhteen Raja NJ
5a985427e7
feat: add sub-command to print current completions (#4586)
* feat: `completer complete` command is added to test current completions

* fix: tests
2021-12-12 08:47:47 +05:30
Noorhteen Raja NJ
0c13e8c008
adding convention for short boolean flags (#4520)
* feat: use NumpyDoc to represent Parsed docstring

in cli_utils.py

* feat: set argparse boolean option from default values

* refactor: shorter Arg in annotation

by following convention in cli_utils.py

* fix: get description without Parameters

* fix: qa errors
2021-11-17 13:51:18 -05:00
Noorhteen Raja NJ
076098899a
feat: use argparserAlias for xexec (#4440)
* feat: use argparserAlias for xexec

* docs: news item

* docs: add todo

* fix: failing tests

* fix: failing tests

* fix: update xexec--help test

* feat: add epilog if available to argparse

* feat: implement epilog section for xexec

* docs:
2021-08-28 17:23:20 +03:00
Noorhteen Raja NJ
54f5ae7bb2
Argparser/color+completion (#4391)
* feat: add colored help formatter and alias builder

closes #4284

* feat: add auto-completion support to argparser

* test: update test for completer

* fix: getting doc from params that have annotation

* refactor: use filter-function for checking alias completions

* doc: add discussion abount check for alias having parser

see discussion on
https://github.com/xonsh/xonsh/pull/4267

* type fix

* refactor: use function based completer

* test: fix failing argparser test

* docs: update news item

* update completion for argparser sub-commands to append_space

from comment on
https://github.com/xonsh/xonsh/pull/4267#discussion_r676044508

* docs: update docstring typo

* refactor: move inspect import to top

* feat: support option strings before positionals

and add env setting for showing completions for options by default

* test: update tests after adding new $ALIAS_COMPLETIONS_OPTIONS_BY_DEFAULT

* add suggested completion_context_parse fixture

* docs: add suggested doc for dispatch function

* refactor: use try/except for import of typing.annotated

* refactor: move complete_argparser_aliases to completers/aliases.py

* refactor: move argparser completer to its own module

* style:

* refactor: rename completer to not clash with argparse

* fix: expand option's descriptions

* fix: add completer/argparser to amalgam
2021-08-26 01:32:13 +03: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