Skip to content

Commit

Permalink
Revert to use bash completion and not fzf completion
Browse files Browse the repository at this point in the history
  • Loading branch information
bigbruno committed Sep 22, 2024
1 parent 8006913 commit a468f97
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
23 changes: 10 additions & 13 deletions usr/share/biglinux/bash-config/bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -129,25 +129,24 @@ export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"

# Auto completion Configuration
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi

# FZF Configuration
if [ -f /usr/share/fzf/key-bindings.bash ]; then
. /usr/share/fzf/completion.bash
. /usr/share/fzf/key-bindings.bash
eval "$(fzf --bash)"
# using ripgrep combined with preview
# find-in-file - usage: fif <searchTerm>
fif() {
if [ ! "$#" -gt 0 ]; then echo "Need a string to search for!"; return 1; fi
fzf --preview "highlight -O ansi -l {} 2> /dev/null | rga --ignore-case --pretty --context 10 '$1' {}" < <(rga --files-with-matches --no-messages "$1")
}
else
# Auto completion Configuration
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
fi

# Attach Blesh with oh my posh if available
Expand All @@ -156,8 +155,6 @@ if [[ ${BLE_VERSION-} ]]; then
# FZF Configuration
if [ -f /usr/share/fzf/key-bindings.bash ]; then
_ble_contrib_fzf_base=/usr/share/fzf/
ble-import -d integration/fzf-completion
ble-import -d integration/fzf-key-bindings
fi

ble-attach
Expand Down
5 changes: 2 additions & 3 deletions usr/share/biglinux/bash-config/blerc
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ bleopt complete_requote_threshold=-1
## The following setting controls the delay of auto-complete after the last
## user input. The unit is millisecond.

bleopt complete_auto_delay=300
bleopt complete_auto_delay=150


## The setting "complete_auto_wordbreaks" is used as the delimiters for
Expand Down Expand Up @@ -896,8 +896,7 @@ bleopt menu_align_max=150
## The setting "filename_ls_colors" can be used to import the filename coloring
## scheme by the environment variable LS_COLORS.

#bleopt filename_ls_colors="$LS_COLORS"

bleopt filename_ls_colors="$LS_COLORS"

## The following settings enable or disable the syntax highlighting. When the
## setting "highlight_syntax" has a non-empty value, the syntax highlighting is
Expand Down

0 comments on commit a468f97

Please sign in to comment.