NativeScript / nativescript-cli

Command-line interface for building NativeScript apps
https://www.npmjs.com/package/nativescript
Apache License 2.0
1.04k stars 195 forks source link

fix(autocomplete): fix the generation of the autocomplete script and prevent duplication on enable/disable #5794

Closed jcassidyav closed 7 months ago

jcassidyav commented 8 months ago

PR Checklist

What is the current behavior?

The command ns autocomplete enable doesn't work in the current version as the incorrect command is called to yargs to generate the script.

In addition the yargs script doesn't seem to work with the commands ns tns.

Also the existing script duplicates the contents of .tnsrc on enable/disable and it does not clean up what the previous implementation did.

What is the new behavior?

This should now implement ns autocomplete enable/disable so that it works for ns/tns as you would expect. It cleans up the previous implementation and does not duplicate entries in .tnsrc on repeated enable/disable.