Permalink
Browse files

This doesn't work from the cli context

  • Loading branch information...
1 parent 4607ce5 commit 177959d38dc31180979f35eafe7ba4fdaee0db00 @RStankov RStankov committed Feb 7, 2012
Showing with 6 additions and 6 deletions.
  1. +6 −6 lib/commands.js
View
@@ -56,10 +56,10 @@ commands.version = function() {
* @api public
*/
commands.list = function() {
- this.todos[app.argv.all ? 'all' : 'undone'](function(items) {
commands.print('');
items.map(format).map(commands.print);
commands.print('');
+ commands.todos[app.argv.all ? 'all' : 'undone'](function(items) {
});
};
@@ -70,7 +70,7 @@ commands.list = function() {
* @api public
*/
commands.check = function(num) {
- this.todos.check(+num - 1, true);
+ commands.todos.check(+num - 1, true);
};
/**
@@ -80,7 +80,7 @@ commands.check = function(num) {
* @api public
*/
commands.undo = function(num) {
- this.todos.check(+num - 1, false);
+ commands.todos.check(+num - 1, false);
};
/**
@@ -90,7 +90,7 @@ commands.undo = function(num) {
* @api public
*/
commands.destroy = function(num) {
- this.todos.destroy(+num - 1);
+ commands.todos.destroy(+num - 1);
};
/**
@@ -100,7 +100,7 @@ commands.destroy = function(num) {
* @api public
*/
commands.clear = function(num) {
- this.todos.clear();
+ commands.todos.clear();
};
/**
@@ -110,7 +110,7 @@ commands.clear = function(num) {
* @api public
*/
commands.add = function(item) {
- this.todos.add(item);
+ commands.todos.add(item);
};
/**

0 comments on commit 177959d

Please sign in to comment.