Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Support abbreviated cdn commands

  • Loading branch information...
commit e1840afa18be88aceae514c86c2b600de66ad553 1 parent 3f74516
@davglass davglass authored
Showing with 11 additions and 0 deletions.
  1. +11 −0 lib/cmds/cdn.js
View
11 lib/cmds/cdn.js
@@ -273,6 +273,7 @@ mods = {
});
},
init: function(options) {
+ var i, found = [];
this.options = options;
this.cmd = options.parsed.argv.remain[0];
if (this.cmd === 'pending') {
@@ -297,6 +298,16 @@ mods = {
log.bail('command is not valid in yui repo: yogi help cdn');
}
}
+ if (this.cmd && !this.cmds[this.cmd]) {
+ for (i in this.cmds) {
+ if (i.indexOf(this.cmd) === 0) {
+ found.push(i);
+ }
+ }
+ if (found.length === 1) {
+ this.cmd = found.pop();
+ }
+ }
if (!this.cmd || !this.cmds[this.cmd]) {
this.print();
return;
Please sign in to comment.
Something went wrong with that request. Please try again.