plugins/todo: lint

plugin/base: use `_bash-it-component-item-is-enabled()`
pull/2005/head
John D Pell 2021-12-27 12:53:36 -08:00
parent 2e51e92699
commit 02b57a83ef
3 changed files with 5 additions and 9 deletions

View File

@ -109,6 +109,7 @@ plugins/available/pyenv.plugin.bash
plugins/available/rbenv.plugin.bash
plugins/available/ruby.plugin.bash
plugins/available/textmate.plugin.bash
plugins/available/todo.plugin.bash
plugins/available/xterm.plugin.bash
plugins/available/zoxide.plugin.bash

View File

@ -120,8 +120,7 @@ function usage() {
esac
}
# shellcheck disable=SC2144 # the glob matches only one file
if [[ ! -e "${BASH_IT?}/plugins/enabled/todo.plugin.bash" && ! -e "${BASH_IT?}/plugins/enabled"/*"${BASH_IT_LOAD_PRIORITY_SEPARATOR-}todo.plugin.bash" ]]; then
if ! _bash-it-component-item-is-enabled plugin todo; then
# if user has installed todo plugin, skip this...
function t() {
about 'one thing todo'

View File

@ -1,12 +1,8 @@
#!/bin/bash
cite about-plugin
# shellcheck shell=bash
about-plugin 'Todo.txt integration'
# you may override any of the exported variables below in your .bash_profile
if [ -z "$TODOTXT_DEFAULT_ACTION" ]; then
# typing 't' by itself will list current todos
export TODOTXT_DEFAULT_ACTION=ls
fi
: "${TODOTXT_DEFAULT_ACTION:=ls}"
export TODOTXT_DEFAULT_ACTION
alias t='todo.sh'