Closed qoreQyaS closed 1 year ago
Thank you for the detailed report. I could reproduce the problem, so I fixed it at my side. I pushed a fix 32277dae20f004c3a65aeb3adae881b8b8e0318f to the master. Could you update ble.sh
by ble-update
and check if it is now working as expected?
[ Summary of the issue: This was caused by a design conflict with fzf
. Most programmable completion settings do not correctly handle various quotes, the tilde expansion, and the pathname expansions, so ble.sh adjusts the programmable completion so that completers do not have to handle these non-trivial transformations. However, ble.sh needs to turn off these adjustments for fzf
because fzf
tries to find a special meaning on a particular combination of pathname expansions **
unlike the other completions. This exceptional treatment for fzf
was already implemented. Here, the problem was that some part of the handlers in ble.sh assumed the adjustments. In particular, when fzf
was combined with bash-completion
, the issue arises. I now implemented the treatment for the case where the adjustments are turned off. ]
it is also working on my side. thank you very much for the extensive elucidation and the clearance of the stain in your great addition to bash.
Thank you!
ble version: 0.4.0-devel3+fb7bd0b
Bash version: 5.2.2(1)-release (x86_64-pc-linux-gnu)
bashrc & blerc
## ~/.bashrc `grep -v '^[ \t]*#' ~/.bashrc|awk NF` ```bash case $- in *i*) ;; *) return;; esac if [ -x /usr/bin/dircolors ]; then test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" alias ls='ls --color=auto' alias dir='dir --color=auto' alias vdir='vdir --color=auto' alias grep='grep --color=auto' alias fgrep='fgrep --color=auto' alias egrep='egrep --color=auto' fi source /home/sgrewe/.local/share/blesh/ble.sh --noattach function _update_ps1() { PS1=$(powerline-shell $?) } if [[ $TERM != linux && ! $PROMPT_COMMAND =~ _update_ps1 ]]; then PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND" fi HISTSIZE=100000 HISTTIMEFORMAT="%F %T " HISTCONTROL=ignoredups:erasedups:ignorespace shopt -s histappend shopt -s cmdhist lithist shopt -s checkwinsize shopt -s globstar if [ -f ~/.bash_aliases ]; then . ~/.bash_aliases fi . "$HOME/.cargo/env" set -a source /etc/environment for i in /etc/environment.d/*.conf; do source "${i}" done export RIPGREP_CONFIG_PATH=/home/sgrewe/.config/ripgrep/rg.conf set +a export FD_OPTIONS="--hidden --follow" export FZF_DEFAULT_OPTS="--bind \"F1:toggle-preview\" --no-mouse --height 80% --reverse --multi --info=inline --preview \"rougify {} 2> /dev/null || cat {} 2> /dev/null || tree -C {} 2> /dev/null | head -100\" --color dark,hl:33,hl+:37,fg+:235,bg+:136,fg+:254 --color info:254,prompt:37,spinner:108,pointer:235,marker:235" export FZF_DEFAULT_COMMAND="git ls-files --cached --others --exclude-standard 2>/dev/null || fdfind --type f --type l $FD_OPTIONS" export FZF_CTRL_R_OPTS="--bind \"F1:toggle-preview\" --preview \"echo {}\" --preview-window down:3:hidden:wrap" export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" export PATH="${HOME}/bin:${HOME}/.local/bin:${PATH}:${HOME}/.local/share/gem/ruby/3.1.0/bin" [[ ${BLE_VERSION-} ]] && ble-attach ble-bind -f up 'history-search-backward immediate-accept' ble-bind -f down 'history-search-forward immediate-accept' _ble_contrib_fzf_base=$HOME/.fzf ble-import -d contrib/fzf-completion ble-import -d contrib/fzf-key-bindings ``` ## ~/.blerc `grep -v '^[ \t]*#' ~/.blerc|awk NF` ```bash bleopt history_lazyload=1 bleopt history_share=on bleopt history_erasedups_limit= # entire history bleopt complete_auto_complete=1 bleopt complete_menu_complete=1 bleopt complete_menu_filter=1 bleopt complete_contract_function_names=1 bleopt complete_auto_history=1 bleopt complete_auto_delay=1000 bleopt complete_auto_menu=2000 bleopt complete_menu_color=on bleopt filename_ls_colors="$LS_COLORS" bleopt highlight_syntax=true bleopt highlight_filename=true bleopt highlight_variable=true function blerc/emacs-load-hook { return } blehook/eval-after-load keymap_emacs blerc/emacs-load-hook function blerc/vim-load-hook { ((_ble_bash>=40300)) && builtin bind 'set keyseq-timeout 1' } blehook/eval-after-load keymap_vi blerc/vim-load-hook ```Hi,
certain completions don't add a / after the directory name when using ~ in the beginning of the path, no matter how often i press TAB. When waiting for autocomplete only the directory without / in the end is offered.
examples for not working completions:
ls
cat
view
examples for working completions
echo
dir
ssh
any non existent keyword also works and has no completion defined for example
wurst