-
-
Notifications
You must be signed in to change notification settings - Fork 226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add autocomplete feature in cli #1724
base: master
Are you sure you want to change the base?
Conversation
|
/u |
/u |
@AayushSaini101 I don't think this is ths way autocomplete should be done can we run it as part of installation process? |
Sure. Let me check during the installation process |
Awesome feature in my opinion, I am always forgetting commands 😆 |
@@ -163,6 +165,7 @@ | |||
"pretest": "npm run build", | |||
"pretest:coverage": "npm run build", | |||
"posttest": "rimraf ./test.asyncapi-cli", | |||
"postinstall": "node ./scripts/enableAutoComplete.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this script runs after packaging as well?
Also what about docker image. Does this still work there?
Same question for chocolatey.
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
const shellConfigs = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about their derivatives?
}, | ||
fish: { | ||
rcFile: path.join(os.homedir(), '.config', 'fish', 'completions', 'asyncapi.fish'), | ||
detectFile: path.join(os.homedir(), '.config', 'fish', 'config.fish'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Detection using $SHELL or some other way would be better. Not everyone has their config like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/u |
|
Proof of working:

Resolves: #1685