mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-24 03:05:41 +00:00
refactor(console) cmd -> command
This commit is contained in:
parent
5e1dd3e16d
commit
5640baeeda
1 changed files with 8 additions and 8 deletions
|
|
@ -243,17 +243,17 @@
|
|||
}
|
||||
}
|
||||
|
||||
function onCloudCmd(cmd, callback) {
|
||||
function onCloudCmd(command, callback) {
|
||||
var is;
|
||||
|
||||
cmd = Util.rmStr(cmd, CLOUDCMD);
|
||||
is = !equalPart(cmd, ' ');
|
||||
command = Util.rmStr(command, CLOUDCMD);
|
||||
is = !equalPart(command, ' ');
|
||||
|
||||
if (is) {
|
||||
Util.exec(callback, HELP);
|
||||
} else {
|
||||
cmd = Util.rmStr(cmd, ' ');
|
||||
is = update && equalPart(cmd, 'update');
|
||||
command = Util.rmStr(command, ' ');
|
||||
is = update && equalPart(command, 'update');
|
||||
|
||||
if (is) {
|
||||
update.get();
|
||||
|
|
@ -263,7 +263,7 @@
|
|||
});
|
||||
}
|
||||
|
||||
is = Util.strCmp(cmd, 'exit');
|
||||
is = Util.strCmp(command, 'exit');
|
||||
|
||||
if (is)
|
||||
process.exit();
|
||||
|
|
@ -272,10 +272,10 @@
|
|||
return is;
|
||||
}
|
||||
|
||||
function onCD(cmd, currDir, callback) {
|
||||
function onCD(command, currDir, callback) {
|
||||
var dir,
|
||||
getDir = WIN32 ? 'chdir' : 'pwd',
|
||||
paramDir = Util.rmStr(cmd, 'cd ');
|
||||
paramDir = Util.rmStr(command, 'cd ');
|
||||
|
||||
if (equalPart(paramDir, ['/', '~']))
|
||||
dir = paramDir;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue