Merge pull request #1273 from kigster/kig/search/improved

Speed up bash-it Search & support exact matches
This commit is contained in:
Nils Winkler
2019-01-14 09:05:02 +01:00
committed by GitHub
7 changed files with 600 additions and 145 deletions

View File

@@ -42,7 +42,7 @@ bash-it ()
example '$ bash-it disable alias hg [tmux]...'
example '$ bash-it migrate'
example '$ bash-it update'
example '$ bash-it search ruby [[-]rake]... [--enable | --disable]'
example '$ bash-it search [-|@]term1 [-|@]term2 ... [ -e/--enable ] [ -d/--disable ] [ -r/--refresh ] [ -c/--no-color ]'
example '$ bash-it version'
example '$ bash-it reload'
typeset verb=${1:-}
@@ -50,6 +50,7 @@ bash-it ()
typeset component=${1:-}
shift
typeset func
case $verb in
show)
func=_bash-it-$component;;
@@ -387,6 +388,8 @@ _disable-thing ()
fi
fi
_bash-it-clean-component-cache "${file_type}"
if [ -n "$BASH_IT_AUTOMATIC_RELOAD_AFTER_CONFIG_CHANGE" ]; then
exec ${0/-/}
fi
@@ -482,6 +485,8 @@ _enable-thing ()
ln -s ../$subdirectory/available/$to_enable "${BASH_IT}/enabled/${use_load_priority}${BASH_IT_LOAD_PRIORITY_SEPARATOR}${to_enable}"
fi
_bash-it-clean-component-cache "${file_type}"
if [ -n "$BASH_IT_AUTOMATIC_RELOAD_AFTER_CONFIG_CHANGE" ]; then
exec ${0/-/}
fi