We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 11c86c3 commit 8b98685Copy full SHA for 8b98685
1 file changed
lib/commands/domain/domain._js
@@ -44,6 +44,17 @@ exports.init = function (cli) {
44
45
var domainClient = new DomainClient(cli);
46
47
+ function sortByName(a, b) {
48
+ var nameA=a.name.toLowerCase(), nameB=b.name.toLowerCase();
49
+ if (nameA < nameB) { //sort string ascending
50
+ return -1;
51
+ }
52
+ if (nameA > nameB) {
53
+ return 1;
54
55
+ return 0; //default return value (no sorting)
56
57
+
58
domain.listCommand = function (name, options, _) {
59
var context = {
60
subscription: profile.current.getSubscription(options.subscription).id,
@@ -256,6 +267,7 @@ exports.init = function (cli) {
256
267
}
257
268
}, _);
258
269
270
+ results = results.sort(sortByName);
259
271
//results = async.parallel(checks, _);
260
272
} else {
261
273
results = [domain.doDomainCheck(context, _)];
0 commit comments