added new commands for quitting, opening tabs and added argument functionality for commands

This commit is contained in:
Dave de Fijter 2015-02-22 16:09:40 +01:00
parent 4a547e64fd
commit 2cafba248c
2 changed files with 28 additions and 6 deletions

View file

@ -11,10 +11,11 @@ class Command
execute: (input) ->
return unless input.characters.length > 0
[command, args...] = input.characters.split(" ")
func = (new Ex)[input.characters]
func = (new Ex)[command]
if func?
func()
func(args)
else
throw new CommandError("#{input.characters}")