-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
add todo.txt-cli as a plugin #129
Conversation
Since it is referenced in the default .bash_profile and in aliases and themes, why not make it an official plugin? This creates a 'todo/' directory in /plugins/available, and installs todo.sh and friends there. Tab completion and the 't' alias should work out of the box. Note: it was also necessary to modify .gitignore to ignore the files todo.sh generates in custom/.
@@ -0,0 +1,13 @@ | |||
#!/bin/bash | |||
|
|||
export TODO_DIR=$HOME/.bash_it/custom # store todo items in user's custom dir, ignored by git |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two things:
s/.bash_it/$BASH_IT/
so its relocatable. Since I just merged the other PR about this, it's sticking out. :-)- What about adding a check for environment variables of the same name and not overriding them? That gives the user a chance to set them in
~/.bash_profile
to be custom.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. I'll resubmit with the patch by @nwinkler.
Respecting user overrides is smart. Let's do that, too :)
This looks good minus the need for |
overrides may now be specified for any of these defaults: TODO_DIR=$BASH_IT/custom # change if you want todo.txt and friends # to live somewhere else TODOTXT_DEFAULT_ACTION=ls # change if you want a different action, # like 'lsp' or 'lsprj' TODO_SRC_DIR= $BASH_IT/plugins/available/todo # for custom installs with plugins
since we're sourcing this as a plugin, which loads the function, it's counterproductive to also define the 'fasd' alias moving the about-plugin metadata into the case block makes this script safe for execution even if composure metadata isn't exported and available rename fasd.bash to fasd.plugin.bash to bring it inline with the other plugin scripts
The ls command in for loop has a pattern now, so full paths are returned. The user prompt and symbolic link have been updated to handle this. Also, not all plugins have '.plugin.' in the middle of their names and weren't showing up on user prompt. With this commit, everything after the first period in the file name is stripped.
Fix for install.sh for partial installations
Updating git.completion.bash
Plugin management system (big thanks to @erichs)
What needs to happen to make this merge cleanly? |
Sorry, let me merge master into it. I'll fix any conflicts and push again. Best wishes, On May 17, 2012, at 5:42 PM, Travis Swicegood reply@reply.github.com wrote:
|
if user has installed the todo plugin, forego defining the 'one thing' todo function t().
if user has enabled the todo plugin, skip defining the 'one thing' todo function t().
This should apply. |
Since it is referenced in the default .bash_profile and in aliases and
themes, why not make it an official plugin?
This creates a 'todo/' directory in /plugins/available, and installs
todo.sh and friends there. Tab completion and the 't' alias should work
out of the box.
Note: it was also necessary to modify .gitignore to ignore the files
todo.sh generates in custom/.