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

Optimization: Put grep -v empty task filter inside sed. #72

Merged
merged 1 commit into from Jan 24, 2012

Conversation

inkarkat
Copy link
Member

Second try... I think I've found and fixed the previous issue that caused test failures on OS X (but could test only on the similar BSD).

The sed on OS X does not understand the + bound, only in the form of + when used with -E. Instead, I chose to fall back to the {1,} basic regexp, in the hope that it is very portable, and to avoid introducing extended regexps to the script.

No need to spawn off another process for this; we can do this inside the sed command that joins the task numbers with the task text.

Note: The sed on OS X does not understand the \+ bound, only in the form of + when used with -E. Instead, I chose to fall back to the \{1,\} basic regexp, in the hope that it is very portable, and to avoid introducing extended regexps to the script.
@ginatrapani
Copy link
Member

Tests pass on OS X now. Thanks!

ginatrapani added a commit that referenced this pull request Jan 24, 2012
Optimization: Put grep -v empty task filter inside sed.
@ginatrapani ginatrapani merged commit 9e38fa1 into todotxt:master Jan 24, 2012
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

Successfully merging this pull request may close these issues.

None yet

2 participants