aio-cli
aio-cli copied to clipboard
autocorrection not working (with plugins)
Expected Behaviour
Where aio detects a typo in the command and proposes a correction, it should apply the correction to the command..
Actual Behaviour
$ aio activation list
› Warning: activation is not a aio command.
Did you mean rt:activation? [y/n]: y
› Error: Unexpected argument: list
› See more help with --help
aio proposes the right correction.. but somehow fails to apply
Reproduce Scenario (including but not limited to)
Steps to Reproduce
Platform and Version
System:
OS: macOS 10.15.7
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 64.96 MB / 16.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 12.20.0 - ~/.nvm/versions/node/v12.20.0/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.10 - ~/.nvm/versions/node/v12.20.0/bin/npm
Virtualization:
Docker: 20.10.5 - /usr/local/bin/docker
npmGlobalPackages:
@adobe/aio-cli: 6.0.0
CLI plugins:
@adobe/aio-cli 6.0.0 (core)
@adobe/aio-cli-plugin-app 6.1.0 (core)
@adobe/aio-cli-plugin-auth 2.4.1 (core)
@adobe/aio-cli-plugin-certificate 0.2.1 (core)
@adobe/aio-cli-plugin-cloudmanager 1.3.4 (user)
@adobe/aio-cli-plugin-config 2.3.0 (core)
@adobe/aio-cli-plugin-console 3.3.0 (core)
@adobe/aio-cli-plugin-events 1.1.0 (core)
@adobe/aio-cli-plugin-ims 2.0.0 (user)
@adobe/aio-cli-plugin-info 1.1.1 (core)
@adobe/aio-cli-plugin-runtime 3.1.0 (user)
@oclif/plugin-autocomplete 0.3.0 (core)
@oclif/plugin-help 2.2.3 (core)
@oclif/plugin-not-found 1.2.4 (core)
@oclif/plugin-plugins 1.10.0 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
Sample Code that illustrates the problem
Logs taken while reproducing problem
nb: the behaviour above seems consistent with number of commands
Hi @ackoch , thanks for raising the issue.
@shazron @Himavanth could you have a look?
This is an issue with oclif not supporting "space" as delimiter. https://github.com/oclif/oclif/issues/331 We do manipulate it to some extent to support spaces but there is only so much we can do. We lose the control once oclif gets to "did you mean".
It works with :
s though.
aio activation:list
would work properly with the autocorrection.