diff --git a/clite/commands.js b/clite/commands.js index ab256d6..9054a61 100644 --- a/clite/commands.js +++ b/clite/commands.js @@ -11,6 +11,7 @@ clite.commands.load('ls',function(args,env,io) { var long = false; function help() { io.write(` +ls - list directory contents Usage: ls [OPTION] [FILE] Options: @@ -39,7 +40,7 @@ Options: long = true; break; default: - io.error('unknown argument: '+args[i]); + io.error('unknown argument: -'+args[i][j]); } } }else if (args[i][0] == '/') { @@ -82,6 +83,7 @@ clite.commands.load('cat',function(args,env,io) { function help() { io.write(` +cat - concatenate files and print to std output or local file Usage: cat [OPTION] [FILE] Options: @@ -102,7 +104,7 @@ Options: download = true; break; default: - io.error('unknown argument: '+args[i]); + io.error('unknown argument: -'+args[i][j]); } } }else if (args[i][0] == '/') { @@ -162,5 +164,57 @@ Options: return null; }); +clite.commands.load('touch',function(args,env,io) { + var file = null; + function help() { + io.write(` +touch - create a new empty file +Usage: touch [OPTION] + +Options: +-? Print this help information + `); + } + + for (var i=1; i