feat: external completions for commands/flags (#6295)

* wip

* wip

* cleanup

* error message

* cleanup

* cleanup

* fix clippy

* add test

* fix span

* cleanup

* cleanup

* cleanup

* fixed completion

* push char

* wip

* small fixes

* fix remove last span

* fmt

* cleanup

* fixes + more tests

* fix test

* only complete for commands

* also complete flags

* change decl_id to block_id

* use nu completion first

* fix test

* ignore test

* update config section
This commit is contained in:
Herlon Aguiar
2022-08-22 20:38:51 +02:00
committed by GitHub
parent 772ad896c8
commit 646aace05b
5 changed files with 271 additions and 84 deletions

View File

@ -231,8 +231,15 @@ let light_theme = {
shape_nothing: light_cyan
}
# External completer example
# let carapace_completer = {|spans|
# carapace $spans.0 nushell $spans | from json
# }
# The default config record. This is where much of your global configuration is setup.
let-env config = {
external_completer: $nothing # check 'carapace_completer' above to as example
filesize_metric: false
table_mode: rounded # basic, compact, compact_double, light, thin, with_love, rounded, reinforced, heavy, none, other
use_ls_colors: true