diff --git a/lib/middleware/index.js b/lib/middleware/index.js index 3ba4e45..305f139 100644 --- a/lib/middleware/index.js +++ b/lib/middleware/index.js @@ -1,5 +1,6 @@ module.exports = [ require("./help"), + require("./shorthand"), require("./project"), require("./creds"), require("./auth"), diff --git a/lib/middleware/shorthand.js b/lib/middleware/shorthand.js new file mode 100644 index 0000000..bcb51e6 --- /dev/null +++ b/lib/middleware/shorthand.js @@ -0,0 +1,9 @@ +var path = require("path") +var fs = require("fs") +var helpers = require("./util/helpers") + +module.exports = function(req, next){ + req.argv.project = req.argv.p = req.argv.project || req.argv.p || req.argv["_"][0] || null + req.argv.domain = req.argv.d = req.argv.domain || req.argv.d || req.argv["_"][1] || null + next() +} \ No newline at end of file