Skip to content

Commit f650341

Browse files
committed
At post-install, ask the user to turn on autocompletion
Introduce the "autocomplete" command to allow user to turn it on when they need it.
1 parent 130864b commit f650341

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

postinstall.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,3 @@
11
"use strict";
22
var child_process = require("child_process");
3-
var command = process.argv[0] + ' bin/nativescript.js dev-post-install';
4-
child_process.exec(command, function(error, stdout, stderr) {
5-
if (stdout !== null && stdout.toString() !== "") {
6-
console.log('stdout: ' + stdout);
7-
}
8-
if (stderr !== null && stderr.toString() !== "") {
9-
console.log('stderr: ' + stderr);
10-
}
11-
if (error !== null) {
12-
console.log('exec error: ' + error);
13-
}
14-
});
3+
child_process.spawn(process.argv[0], ["bin/nativescript.js", "dev-post-install"], {stdio: "inherit"});

resources/help.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ General commands:
3030
device run Runs the selected application on a connected device.
3131
device list-applications Lists the installed applications on all connected devices.
3232
feature-usage-tracking Configures anonymous feature usage tracking.
33+
autocomplete Turn on command line autocompletion for bash and zsh
3334

3435
General options:
3536
--help, -h, /? Prints help about the selected command.
@@ -682,4 +683,13 @@ All data gathered is used strictly for improving the product and will never be u
682683
for improving the product and will never be used to identify or contact you.
683684
disable - Disables anonymous usage statistics tracking.
684685

685-
--[/]--
686+
--[/]--
687+
688+
--[autocomplete]--
689+
690+
Turns on command line autocompletion for bash and zsh.
691+
692+
Usage:
693+
$ tns autocomplete
694+
695+
--[/]--

0 commit comments

Comments
 (0)