Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On Windows, help command and short help (-h) flag add and empty task #127

Closed
chaghi opened this issue Jan 2, 2014 · 2 comments
Closed

Comments

@chaghi
Copy link

chaghi commented Jan 2, 2014

Using the todo.txt-cli version 2.10 on Windows (under a Git Bash shell), both the help command and the -h flag add an empty task at the end of the todo.txt file.

Example:

$ tail -2 $TODO_FILE
2014-01-02 Test task 1
2014-01-02 Test task 2
$ t help
     # (help output ommited) 
$ tail -2 $TODO_FILE
2014-01-02 Test task #2
2014-01-02

An empty task with just today's date, 2014-01-02 is added at the end of the todo.txt file.

t -h also adds an empty task.

I know this is rather a Windows/Git Bash issue, but I wonder if the same happens on Cygwin, and if there's something that can be done in the script to avoid this.

@chaghi
Copy link
Author

chaghi commented Jan 2, 2014

Nevermind. Turns out the problem is the add command from the todo.txt-tools package. It is not handling the help correctly, and when invoked without arguments (which is done by the help command over each custom action) it adds an empty task.

I'm closing the issue.

@chaghi chaghi closed this as completed Jan 2, 2014
@inkarkat
Copy link
Member

inkarkat commented Jan 2, 2014

The help command passes a single usage argument, which add-ons indeed must handle (and most do, by convention). Otherwise, your analysis is fully correct. Thanks for reporting this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants