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

add todo.txt-cli as a plugin #129

Merged
merged 12 commits into from
Jul 10, 2012
Merged

add todo.txt-cli as a plugin #129

merged 12 commits into from
Jul 10, 2012

Conversation

erichs
Copy link
Contributor

@erichs erichs commented May 9, 2012

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/.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two things:

  1. s/.bash_it/$BASH_IT/ so its relocatable. Since I just merged the other PR about this, it's sticking out. :-)
  2. 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.

Copy link
Contributor Author

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 :)

@tswicegood
Copy link
Member

This looks good minus the need for $BASH_IT.

Draiken and others added 9 commits May 10, 2012 14:52
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
Plugin management system (big thanks to @erichs)
@tswicegood
Copy link
Member

What needs to happen to make this merge cleanly?

@erichs
Copy link
Contributor Author

erichs commented May 17, 2012

Sorry, let me merge master into it. I'll fix any conflicts and push again.

Best wishes,
Erich

On May 17, 2012, at 5:42 PM, Travis Swicegood reply@reply.github.com wrote:

What needs to happen to make this merge cleanly?


Reply to this email directly or view it on GitHub:
#129 (comment)

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().
@erichs
Copy link
Contributor Author

erichs commented May 18, 2012

This should apply.

erichs added a commit that referenced this pull request Jul 10, 2012
add todo.txt-cli as a plugin
@erichs erichs merged commit e1da40a into Bash-it:master Jul 10, 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.

3 participants