mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2026-11-03 23:28:33 +00:00
Add formal support for aliases.
new/create and build/generate
This commit is contained in:
1 parent
e3cb949992
commit
1bcc2f7d0c
2 files changed
+14
-10
No files matched your search
+2
-2
@@ -55,7 +55,7 @@ function main() {
|
||||
// Get the action to be performed
|
||||
var params = a._.map( function(p){ return p.toLowerCase().trim(); });
|
||||
var verb = params[0];
|
||||
if( !FCMD.verbs[ verb ] ) {
|
||||
if( !FCMD.verbs[ verb ] && !FCMD.alias[ verb ] ) {
|
||||
logMsg('Invalid command: "'.warn + verb.warn.bold + '"'.warn);
|
||||
return;
|
||||
}
|
||||
@@ -76,7 +76,7 @@ function main() {
|
||||
( splitAt === -1 ) && src.length > 1 && dst.push( src.pop() ); // Allow omitting TO keyword
|
||||
|
||||
// Invoke the action
|
||||
FCMD.verbs[ verb ].apply( null, [ src, dst, opts, logMsg ] );
|
||||
(FCMD.verbs[verb] || FCMD.alias[verb]).apply(null, [src, dst, opts, logMsg]);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user