Skip to content

Commit

Permalink
# This is a combination of 3 commits.
Browse files Browse the repository at this point in the history
# This is the 1st commit message:

lib/search: code style cleanup

Couldn't even `shellcheck` until I did a first pass...too much noise! ♥

# The commit message #2 will be skipped:

# lib/search: use _bash-it-grep
#
# Don't re-duplicate the utility function _bash-it-grep. Just use it.
# Lib/utilities is expressly loaded just two lines above this usage.

# The commit message #3 will be skipped:

# lib/search: quotes and integers
  • Loading branch information
gaelicWizard committed Sep 6, 2021
1 parent 9b80aea commit 5baf3a8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/search.bash
Original file line number Diff line number Diff line change
Expand Up @@ -284,13 +284,13 @@ _bash-it-search-result() {
fi

local match
local modified=0
local -i modified=0

if [[ "${#matches[@]}" -gt 0 ]] ; then
printf "${color_component}%13s${color_sep} ${color_off}" "${component}"

for match in "${matches[@]}"; do
local enabled=0
local -i enabled=0
( _bash-it-component-item-is-enabled "${component}" "${match}" ) && enabled=1

local match_color compatible_action suffix opposite_suffix
Expand All @@ -314,8 +314,8 @@ _bash-it-search-result() {

printf " ${match_color}${match}${suffix}" # print current state
if [[ "${action}" == "${compatible_action}" ]]; then
if [[ ${action} == "enable" && ${BASH_IT_SEARCH_USE_COLOR} == false ]]; then
_bash-it-flash-term ${len} "${match}${suffix}"
if [[ "${action}" == "enable" && "${BASH_IT_SEARCH_USE_COLOR}" == false ]]; then
_bash-it-flash-term "${len}" "${match}${suffix}"
else
_bash-it-erase-term ${len}
fi
Expand Down

0 comments on commit 5baf3a8

Please sign in to comment.