-
-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fzf] Problems with fzf and ble.sh #41
Comments
fzf completer with **
For the command blehook/eval-after-load complete 'unset -f ble/cmdinfo/complete:cd' For the other commands, 1. ble.sh translates
|
fzf completer with
|
Oh, great! This seems to work very well, even the fzf completer ** for
That's neat - I didn't realize that about ble.sh before. If ble.sh was able to provide the possible expand pathname patterns containing * to the autcomplete menu it would probably reduce a fair amount of what I use fzf for in terms of file navigation. Anyways, thanks for the very quick response! |
One thing I did notice when I ran sed: RE error: illegal byte sequence. It seems I get this message now anytime I try to use the
I have no existing https://junegunn.kr/2016/07/fzf-git/ |
Thank you. I hope this commit 0cc9160 fixes the problem. |
Great, that did solve the issue. Final question. I have a bash version of a key binding that I want to convert to
If I run
It's as if there was a return entered based on what was in standard out. Is this something I'm doing wrong? |
OK! Thank you for checking!
The ble.sh native way is to define a widget and register it through function ble/widget/fzf-git {
ble/widget/insert-string "$($1)"
ble/textarea#invalidate
}
ble-bind -f 'C-g C-f' 'fzf-git gf'
ble-bind -f 'C-g C-b' 'fzf-git gb'
ble-bind -f 'C-g C-t' 'fzf-git gt'
ble-bind -f 'C-g C-h' 'fzf-git gh'
ble-bind -f 'C-g C-r' 'fzf-git gr' Here But if you don't know how to define it, actually you can still use the readline style settings (though it is not as flexible as the native style settings). ble.sh internally tries to translate the readline style settings for # Actually you could just copy and paste
# (Note: \eX is equilvalent to \M-X)
bind '"\er": redraw-current-line'
bind '"\C-g\C-f": "$(gf)\e\C-e\er"'
bind '"\C-g\C-b": "$(gb)\e\C-e\er"'
bind '"\C-g\C-t": "$(gt)\e\C-e\er"'
bind '"\C-g\C-h": "$(gh)\e\C-e\er"'
bind '"\C-g\C-r": "$(gr)\e\C-e\er"'
# Or you can use existing binding C-M-l for redraw-line:
bind '"\C-g\C-f": "$(gf)\M-\C-e\M-\C-l"'
bind '"\C-g\C-b": "$(gb)\M-\C-e\M-\C-l"'
bind '"\C-g\C-t": "$(gt)\M-\C-e\M-\C-l"'
bind '"\C-g\C-h": "$(gh)\M-\C-e\M-\C-l"'
bind '"\C-g\C-r": "$(gr)\M-\C-e\M-\C-l"'
A shell command can be specified for the option for ble-bind -s 'C-g C-b' '$(gb)\M-\C-e' |
Nice, a really fascinating explanation. The only thing I did differently was include the The only problem with the above is that One side note is that
|
Maybe you can also think about using function fzf-git.sabbrev {
COMPREPLY=$($1)
ble/textarea#invalidate
}
ble-sabbrev -m gf='fzf-git.sabbrev gf'
ble-sabbrev -m gb='fzf-git.sabbrev gb'
ble-sabbrev -m gt='fzf-git.sabbrev gt'
ble-sabbrev -m gh='fzf-git.sabbrev gh'
ble-sabbrev -m gr='fzf-git.sabbrev gr' Another possibility would be to use function ble/widget/fzf-git {
ble/widget/insert-string "$($1)"
ble/textarea#invalidate
}
ble-import 'lib/vim-arpeggio.sh'
ble/lib/vim-arpeggio.sh/bind -f 'gf' 'fzf-git gf'
ble/lib/vim-arpeggio.sh/bind -f 'gb' 'fzf-git gb'
ble/lib/vim-arpeggio.sh/bind -f 'gt' 'fzf-git gt'
ble/lib/vim-arpeggio.sh/bind -f 'gh' 'fzf-git gh'
ble/lib/vim-arpeggio.sh/bind -f 'gr' 'fzf-git gr'
Thank you! This is another bug related to |
Cool, looks like that fixed the issue. Those were interesting options I didn't know about - thanks! |
ble version:
0.4.0-devel2+3031007
Bash version:
5.0.11(1)-release
I've noticed two issues if I have both
fzf
and bleh.sh sourced. I.e[ -f ~/.fzf.bash ] && source ~/.fzf.bash
is run manually or in your bashrc.C-r
to see and select previous commandReturn
and the line number will be returned rather than the command. For example, if you select command 515, then'!515'
will be written to standard out.cd **
returnsDo you think it's possible to resolve these types of issues? Thanks in advance!
The text was updated successfully, but these errors were encountered: