Comments (11)
Thanks for the report. Do you use fzf
completions? ble.sh
shrinks the path by default, but fzf
completion seems to generate the full path for the completions.
What are the outputs of the following commands?
$ ble/widget/display-shell-version
$ (shopt -s extdebug; declare -F _fzf_path_completion)
from ble.sh.
Thank you for the super fast response.
It looks like I do use fzf completions:
❯ ble/widget/display-shell-version
GNU bash, version 5.2.15(1)-release (x86_64-pc-linux-gnu) [NixOS 23.05 (Stoat)]
ble.sh, version 0.4.0-devel3+1a5c451c (noarch) [git 2.39.0, GNU Make 4.3, GNU Awk 5.1.1, API: 3.1 (GNU MPFR 4.1.0-p13, GNU MP 6.2.1)]
bash-completion, version 2.11 (hash:39c7d2ab72fdafddada2ba3912b5f50cb482a191, 76396 bytes) (noarch)
fzf key-bindings, (hash:f07b81efe0ddbfb56b254e5172414b859af6160b, 3989 bytes) (noarch)
WARNING: fzf integration "integration/fzf-key-bindings" is not activated.
fzf completion, (hash:9474ea03117b565f340ee8dacb438260b29e0021, 10334 bytes) (noarch) (integration: on)
starship, version 1.14.2 (rustc 1.69.0 (84c898d65 2023-04-16) (built from a source tarball), 1980-01-01 00:00:00 +00:00)
locale: LANG=en_US.UTF-8
terminal: TERM=xterm-256color wcwidth=15.0-west/15.0-2+ri, alacritty:1800 (0;1800;1)
❯ (shopt -s extdebug; declare -F _fzf_path_completion)
_fzf_path_completion 255 /nix/store/snxcrrlmxw0nd0na93xs8qgbdi0fsm6z-fzf-0.40.0/share/fzf/completion.bash
from ble.sh.
OK, thanks for the confirmation! I think I'll later consider adding workarounds/adjustments to the fzf completion.
from ble.sh.
I did not explicitly set
# Setup fzf
ble-import -d integration/fzf-completion
ble-import -d integration/fzf-key-bindings
in my ~/.blerc
so I wonder if fzf got picked up in another way to be used for completions. Aah found it I guess:
https://nix-community.github.io/home-manager/options.html#opt-programs.fzf.enableBashIntegration
and source:
https://github.com/nix-community/home-manager/blob/master/modules/programs/fzf.nix#L173-L181
from ble.sh.
OK, if you didn't intend to use the fzf
completion, you may turn off the option to see if you can get the desired behavior.
from ble.sh.
Turning the bash integration off also disables the fzf history widget (CTRL-R) so that's not an option sadly.
I can confirm the directory completion without fzf works like you describe and shortens the path correctly. Maybe there is some flag I can pass to fzf to behave the same way?
from ble.sh.
I don't think there is a flag that can be passed to fzf
. I feel like Home Manager fzf.nix
should provide an option to control both separately.
from ble.sh.
Thank you for the idea.
I was able to only enable the history widget but no completion from fzf like so:
nix home-manager configuration:
programs.fzf.enableBashIntegration = false;
bashrc:
source ${pkgs.fzf}/share/fzf/key-bindings.bash
I will test this out to see if this way I can get the best of both tools.
from ble.sh.
I added a fix f16c0d8 so that the path is correctly shrunk even when the fzf completion is used. Could you test the behavior? Thank you.
from ble.sh.
I can confirm that the path gets correctly shrunk with fzf now. Thank you very much!
from ble.sh.
Thank you for the confirmation!
from ble.sh.
Related Issues (20)
- Sourcing problem `unexpected EOF` HOT 9
- Quoted path autocomplete HOT 5
- [starship] eval after bleopt necessary? HOT 1
- ble-attach (or ble-reload) outputs an EOF HOT 3
- [mawk 1.3.3-20090705] mawk regex error HOT 30
- Syntax highlight error on quotes inside $(( )) HOT 2
- Enter on vim replace mode leaves character highlighted HOT 1
- [GitHub CLI `gh` vs contrib/fzf-git `gh`] Incomprehensible (and maybe atrocious) bludgeoning of all gh commands pertaining to the GitHub CLI system HOT 16
- Slow first start/initialization HOT 6
- Compatibility with oh-my-posh? HOT 8
- Easy way to adopt fish colours? HOT 2
- How to send multiline command in vi mode? HOT 3
- Update reminders HOT 6
- [ecryptfs] `make` called via `ble-update` always rebuilds files (Linux Mint 21.2 with home directory encryption) HOT 24
- Repeated results on completion with progcomp HOT 2
- ble/complete/cand/yield doesn't appear to document it's output variables HOT 11
- Face 'menu_filter_*' not found HOT 6
- Sometimes the terminal is blocked when entering commands HOT 12
- completion select-by-number selects 1st entry when number > # of available choices is entered HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ble.sh.