diff options
-rw-r--r-- | src/main.c | 6 | ||||
-rw-r--r-- | src/note_list.c | 1 |
2 files changed, 3 insertions, 4 deletions
@@ -187,9 +187,9 @@ int main(int argc, char* argv[]) { // return cat_note( list, name ); } else if(strcmp(argv[1], "help") == 0) { get_help(); - // } else if( list.find_note_id( arg ) != -1 ) { - // // Try to open the note if it exists - // return list.edit( editor, arg ); + } else if(note_list_get_note_id(&list, argv[1]) != -1 ) { + // Try to open the note if it exists + return note_list_edit(&list, editor, argv[1]); } else { printf("Error: Unknown command or note name '%s'.\n", argv[1]); return 1; diff --git a/src/note_list.c b/src/note_list.c index 638d631..bcfd1e0 100644 --- a/src/note_list.c +++ b/src/note_list.c @@ -178,7 +178,6 @@ int note_list_edit(note_list_t* list, char* editor, char* note_name) { strcat(path, list->names[id]); strcat(path, "."); strcat(path, list->extension); - printf("%s\n", path); note_t note; note_new(¬e, path); |