-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
[choco fzf] FZF log errors #494
Comments
The problem seems to be that the Cygwin package doesn't include the necessary files: The files are distributed by independent packages: but these will forcibly load the settings in Bash, so it's even worse for Then, you need to manually prepare these files. You can download the settings from the upstream
and put is somewhere (such as |
I downloaded fzf from choco? |
OK, I thought you were talking about the Cygwin version of However, the detailed content of the package does not seem to be available on the above site. Then, I set up $ type -a fzf
fzf is /usr/bin/fzf
fzf is /bin/fzf
fzf is /cygdrive/c/ProgramData/chocolatey/bin/fzf However, the related files still do not seem to be installed by Chocolatey's $ tree /cygdrive/c/ProgramData/chocolatey
/cygdrive/c/ProgramData/chocolatey/
├── CREDITS.txt
├── LICENSE.txt
├── bin
│ ├── RefreshEnv.cmd
│ ├── _processed.txt
│ ├── choco.exe
│ └── fzf.exe
├── choco.exe
├── choco.exe.ignore
├── choco.exe.manifest
├── config
│ ├── chocolatey.config
│ └── chocolatey.config.backup
├── helpers
│ ├── Chocolatey.PowerShell.dll
│ [...snip...]
│
├── lib
│ ├── chocolatey
│ │ └── chocolatey.nupkg
│ └── fzf
│ ├── fzf-0.53.0-windows_amd64_x32.zip.txt
│ ├── fzf.nupkg
│ ├── fzf.nuspec
│ ├── legal
│ │ ├── LICENSE.txt
│ │ └── VERIFICATION.txt
│ └── tools
│ ├── chocolateyInstall.ps1
│ └── fzf.exe
├── logs
│ ├── choco.summary.log
│ └── chocolatey.log
├── redirects
│ ├── RefreshEnv.cmd
│ ├── choco.exe
│ └── choco.exe.ignore
└── tools
├── 7z.dll
├── 7z.dll.manifest
├── 7z.exe
├── 7z.exe.ignore
├── 7z.exe.manifest
├── 7zip.license.txt
├── checksum.exe
├── checksum.exe.config
├── checksum.exe.ignore
├── checksum.license.txt
├── shimgen.exe
├── shimgen.exe.ignore
└── shimgen.license.txt |
I left a request in the Chocolatey package. |
Maintainers of the fzf package on the Chocolatey repository haven't replied so far. I left another comment on the package page. If they don't respond for several days, I'll send a direct message to the maintainers. |
It's OK |
Thanks for your patience. |
I actually anticipate there will be more packages in the future that are missing the shell integration files because the upstream Although it might increase the initialization cost, I'll later add a fallback for the case where the package maintainers didn't include the corresponding files. |
There is still no response from the maintainers of the Chocolatey package for Nevertheless, I added a workaround in akinomyoga/blesh-contrib@5aff5f6. When the shell settings are not found in the system and the fzf version is 0.48.0 or above, ble.sh attempts to get the shell settings by running @louiss0 Could you check the behavior? For the Chocolatey package, I found the maintainer's repository that contains the setup for the fzf package, but it seems to be just downloading a Windows binary from the upstream fzf's release page. However, those binary files in the upstream release page seem to be used in a part of the official installation process and do not seem to comprise the full installation data. |
I'm sorry for taking so long. I was trying out nushell while I was gone. |
Now I have a new error when I try to integrate it with fzf. This is the .bashrc file. # If not running interactively, don't do anything
#~ Initilization Conditions
[[ "$-" != *i* ]] && return
# bashrc
# Add this lines at the top of .bashrc:
[[ $- == *i* ]] && source ~/.basher/cellar/packages/akinomyoga/ble.sh/out/ble.sh --noattach
# Use bash-completion, if available
[[ $PS1 && -f /usr/share/bash-completion/bash_completion ]] && \
source /usr/share/bash-completion/bash_completion
export CYGWIN_HOME_PATH=$(cygpath ~ -m)
#~## FZF
show_file_or_dir_preview="if [[ -d {} ]]; then eza --icons --tree -a --level=3 {} | head -200; else bat -n --color=always --line-range :500 {}; fi"
#~### Variables
export FZF_DEFAULT_COMMAND="fd --path-separator=/ --hidden --strip-cwd-prefix --exclude .git"
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
export FZF_CTRL_T_OPTS="--preview '$show_file_or_dir_preview'"
export FZF_ALT_C_COMMAND="fd --path-separator=/ --type=d --hidden --strip-cwd-prefix --exclude .git"
export FZF_ALT_C_OPTS="--preview 'eza --icons --tree | head -200'"
#~ ### Functions
_fzf_compgen_path() {
fd --hidden --exclude .git . "$1"
}
# Use fd to generate the list for directory completion
_fzf_compgen_dir() {
fd --type=d --hidden --exclude .git . "$1"
}
_fzf_comprun() {
local command=$1
shift
case "$command" in
cd) fzf --preview 'eza --icons --tree -a {} | head -200' "$@" ;;
export|unset) fzf --preview "eval 'echo $'{}" "$@" ;;
*) fzf --preview "$show_file_or_dir_preview" "$@" ;;
esac
}
# Final Execution Commands
eval "$(starship init bash)"
eval "$(zoxide init bash)"
eval "$(fnm env --use-on-cd --shell bash)"
# ---- FZF -----
eval "$(fzf --bash)"
export XDG_CONFIG_HOME=${CYGWIN_HOME_PATH:-HOME}/.config/
# Add this line at the end of .bashrc:
[[ ! ${BLE_VERSION-} ]] || ble-attach
|
Blesh is also keeping me from using this kind of command cd ** |
Did you check |
I did my .blerc file looks like this. # blerc
ble-import -d integration/fzf-completion
ble-import -d integration/fzf-key-bindings |
I also installed blesh by using basher as my package manager. How does |
OK, I think I should have written it in However, even if I have an extra
It shouldn't usually be related, but I'm not sure. I used Could you minimize your |
Also, the situation is unclear. What is that error? Could you provide the error message? Or could you describe what you expect and what you get?
The same for this. Could you describe what you expect and what you get? |
I give up I have no time to spend on this issue. I'm moving on. |
ble version: 0.4.0-devel4+75c4a84
Bash version: 5.2.21(1)-release
I get errors in my console that look like this
This is when I start. But the code still works I'm able to use
ble.sh
withfzf
.To start you need to download Cygwin and use the defaults.
Then download
fzf
fd
andzoxide
usingchoco
Then download basher.
curl -s https://raw.githubusercontent.com/basherpm/basher/master/install.sh | bash
Then use
basher
to downloadble.sh
Then clone this repo.
git clone https://github.com/louiss0/blesh_setup .
This folder comes with the
.config/
folder that I used. It also comes with a.bashrc
file.Just move the files to the root if the bash rc file exists just copy the code from the cloned repo and put it in there.
The text was updated successfully, but these errors were encountered: