Skip to content
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

integration/fzf-menu not working on MacOS #28

Open
hille721 opened this issue Feb 24, 2025 · 5 comments
Open

integration/fzf-menu not working on MacOS #28

hille721 opened this issue Feb 24, 2025 · 5 comments

Comments

@hille721
Copy link

Hi @akinomyoga,

first thank you for your great work. I have a strange issue: I'm using ble.sh for a while no on my Linux Fedora laptop, where everything works great. Now I applied the same settings on my Mac. First of all, compared to my Linux it is really slow (12ms vs 500ms), but well, I can live with that.
But, the fzf-menu is not working. I only get a empty list. Any tips how can I trouble shoot this problem?

$ ble summary
GNU bash, version 5.2.37(1)-release (aarch64-apple-darwin24.0.0)
ble.sh, version 0.4.0-nightly+4338bbf (noarch) [git 2.48.1, GNU Make 4.3, GNU Awk 5.2.1, API 3.2, PMA Avon 8-g1, (GNU MPFR 4.2.1, GNU MP 6.3.0)]
bash-completion, version 2.16.0 (hash:480ffcc6a751e55621ec526eb5dea7a0d86d9e72, 17877 bytes) (noarch)
fzf key-bindings, version +2e57f8f7 (noarch) (integration: on)
fzf completion, version +2e57f8f7 (noarch) (integration: on)
bash-preexec, (hash:b3e19ff4806c83bfb6c2cf55fff0a140de1637f5, 13726 bytes) (noarch)
oh-my-bash, version 1.0.0+b88b2244 (noarch), aliases(general custom local), completions(), plugins(colored-man-pages sudo xterm-custom yazi-custom)
zoxide, version 0.9.7 (/opt/homebrew/bin/zoxide)
atuin, version 18.4.0 (/opt/homebrew/bin/atuin)
locale: LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 LC_TERMINAL=iTerm2 LC_TERMINAL_VERSION=3.5.11
terminal: TERM=xterm-256color wcwidth=15.0-west/16.0-2+ri, xterm:2500 (64;2500;0)
options: +noclobber +autocd +cdable_vars +cdspell +dirspell +extglob +globstar -hostcomplete +histappend +histreedit +histverify +inherit_errexit +lithist +login_shell
@akinomyoga
Copy link
Owner

Thanks for the report. I think this must be the same issue as akinomyoga/ble.sh#530. Then I think the call of the column command on the following line should be modified:

formatter=$formatter' | column -ts "$sep" -o "$sep" -c unlimited'

As I explained in akinomyoga/ble.sh#530 (comment), I originally prepared blesh-contrib for example configurations, i.e., the code repository that the external configuration writer can reference. So I chose to provide a simpler setting rather than a perfect and complicated implementation. It is technically possible to implement the feature of column by ourselves, but the shell implementation would be overly complicated (and the speed wouldn't be nice either). However, maybe I finally need to include such a complicated implementation in blesh-contrib.

@akinomyoga
Copy link
Owner

Maybe I need to add a check for the support for util-linux-2.39 column at least, so it can print an error message if util-linux-2.39 column is not available.

@akinomyoga
Copy link
Owner

@hille721 I don't have macOS, so I haven't tried, but util-linux seems to be able to be installed in macOS. You may try brew install util-linux and see if it provides column.

@hille721
Copy link
Author

@akinomyoga thanks for the fast reply, you pointed me into the right direction, it's working now 👍🏽

It is related to column command. Seems to be MacOS comes with the BSD column, which does not work. So installed the Linux column command via brew install util-linux.

Then I simple changed my .blerc file to:

if [[ "$(uname)" == "Darwin" ]]; then
  # ensure Linux column command is used
  export PATH="/opt/homebrew/opt/util-linux/bin:$PATH"
fi
ble-import -d integration/fzf-menu

@akinomyoga
Copy link
Owner

Thank you for checking! OK, I'll write about brew install util-linux in the documentation later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants