Git Product home page Git Product logo

Comments (11)

akinomyoga avatar akinomyoga commented on June 2, 2024

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.

teutat3s avatar teutat3s commented on June 2, 2024

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.

akinomyoga avatar akinomyoga commented on June 2, 2024

OK, thanks for the confirmation! I think I'll later consider adding workarounds/adjustments to the fzf completion.

from ble.sh.

teutat3s avatar teutat3s commented on June 2, 2024

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.

akinomyoga avatar akinomyoga commented on June 2, 2024

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.

teutat3s avatar teutat3s commented on June 2, 2024

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.

akinomyoga avatar akinomyoga commented on June 2, 2024

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.

teutat3s avatar teutat3s commented on June 2, 2024

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.

akinomyoga avatar akinomyoga commented on June 2, 2024

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.

teutat3s avatar teutat3s commented on June 2, 2024

I can confirm that the path gets correctly shrunk with fzf now. Thank you very much!

from ble.sh.

akinomyoga avatar akinomyoga commented on June 2, 2024

Thank you for the confirmation!

from ble.sh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.