carapace-spec
carapace-spec copied to clipboard
define simple completions using a spec file
### Request Maybe support nargs for flags. Completion would be an issue though. ### Proposed solution ```yaml flags: -n, --nargs{2}=: flag with 2 arguments completion: flag: nargs{0}: ["1", "one"] nargs{1}:...
### Request Maybe support default values for optarg flags. At least for scraping it might be useful. ### Proposed solution ```yaml flags: -o, --optarg[defaultValue]?: optarg flag ``` ### Anything else?...
Support macros for values returned from `$()`. Exclude execute macros like `$()` from this for security reasons.
load user defined macros from `$(UserConfigDir)/carapace/macros` ```yaml name: refs description: git refs default: branches: false tags: false completion: - "$(${C_ARG_BRANCHES:-false} && git branch | cut -c 3-)" - "$(${C_ARG_TAGS:-false} &&...