plugins/todo: lint
plugin/base: use `_bash-it-component-item-is-enabled()`
This commit is contained in:
@@ -109,6 +109,7 @@ plugins/available/pyenv.plugin.bash
|
|||||||
plugins/available/rbenv.plugin.bash
|
plugins/available/rbenv.plugin.bash
|
||||||
plugins/available/ruby.plugin.bash
|
plugins/available/ruby.plugin.bash
|
||||||
plugins/available/textmate.plugin.bash
|
plugins/available/textmate.plugin.bash
|
||||||
|
plugins/available/todo.plugin.bash
|
||||||
plugins/available/xterm.plugin.bash
|
plugins/available/xterm.plugin.bash
|
||||||
plugins/available/zoxide.plugin.bash
|
plugins/available/zoxide.plugin.bash
|
||||||
|
|
||||||
|
|||||||
@@ -120,8 +120,7 @@ function usage() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
# shellcheck disable=SC2144 # the glob matches only one file
|
if ! _bash-it-component-item-is-enabled plugin todo; then
|
||||||
if [[ ! -e "${BASH_IT?}/plugins/enabled/todo.plugin.bash" && ! -e "${BASH_IT?}/plugins/enabled"/*"${BASH_IT_LOAD_PRIORITY_SEPARATOR-}todo.plugin.bash" ]]; then
|
|
||||||
# if user has installed todo plugin, skip this...
|
# if user has installed todo plugin, skip this...
|
||||||
function t() {
|
function t() {
|
||||||
about 'one thing todo'
|
about 'one thing todo'
|
||||||
|
|||||||
@@ -1,12 +1,8 @@
|
|||||||
#!/bin/bash
|
# shellcheck shell=bash
|
||||||
cite about-plugin
|
|
||||||
about-plugin 'Todo.txt integration'
|
about-plugin 'Todo.txt integration'
|
||||||
|
|
||||||
# you may override any of the exported variables below in your .bash_profile
|
# you may override any of the exported variables below in your .bash_profile
|
||||||
|
: "${TODOTXT_DEFAULT_ACTION:=ls}"
|
||||||
if [ -z "$TODOTXT_DEFAULT_ACTION" ]; then
|
export TODOTXT_DEFAULT_ACTION
|
||||||
# typing 't' by itself will list current todos
|
|
||||||
export TODOTXT_DEFAULT_ACTION=ls
|
|
||||||
fi
|
|
||||||
|
|
||||||
alias t='todo.sh'
|
alias t='todo.sh'
|
||||||
|
|||||||
Reference in New Issue
Block a user