Skip to content

Conversation

@unixorn
Copy link
Owner

@unixorn unixorn commented Oct 11, 2025

Description

125 was caused when I used _fzf_has() in fzf-settings.zsh because fzf-zsh-plugin.plugin.zsh was unsetting that alias after it finished to keep the user's environment clean of extra functions, and fzf-settings.zsh was getting loaded later.

Changing to inline $+commands[name] then broke using z because it doesn't find aliases, causing 128

So this fix uses a separate fzf_settings_has() function inside fzf-settings.zsh, which should hopefully solve 125 and 128.

@yusiwen, @GabrielNexT and @iliis, please check this branch out and see if it solves your issues

Checklist

  • All new and existing tests pass.
  • Rather than adding functions to fzf-zsh-plugin.zsh, I have created standalone scripts in bin so they can be used by non-ZSH users too.
  • Any scripts added use #!/usr/bin/env interpreter instead of potentially platform-specific direct paths (#!/bin/sh is an ok exception)
  • Scripts are marked executable
  • Scripts do not have a language file extension unless they are meant to be sourced and not run standalone. No one should have to know if a script was written in bash, python, ruby or whatever. Not including file extensions makes it easier to rewrite the script in another language later without having to change every reference to the previous version.
  • I have confirmed that the link(s) in my PR are valid.
  • I have read the CONTRIBUTING document.

License Acceptance

  • This repository is Apache version 2.0 licensed (some scripts may have alternate licensing inline in their code) and by making this PR, I am contributing my changes to the repository under the terms of the Apache 2 license.

@github-actions
Copy link

github-actions bot commented Oct 11, 2025

⚠️MegaLinter analysis: Success with warnings

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ COPYPASTE jscpd yes no no 1.51s
✅ REPOSITORY devskim yes no no 1.58s
✅ REPOSITORY dustilock yes no no 0.01s
✅ REPOSITORY gitleaks yes no no 0.13s
✅ REPOSITORY git_diff yes no no 0.01s
✅ REPOSITORY grype yes no no 27.49s
⚠️ REPOSITORY kics yes 2 no 1.55s
✅ REPOSITORY secretlint yes no no 1.28s
✅ REPOSITORY syft yes no no 2.07s
✅ REPOSITORY trivy yes no no 8.48s
✅ REPOSITORY trivy-sbom yes no no 0.13s
✅ REPOSITORY trufflehog yes no no 3.66s

Detailed Issues

⚠️ REPOSITORY / kics - 2 errors
MLLLLLM             MLLLLLLLLL   LLLLLLL             KLLLLLLLLLLLLLLLL       LLLLLLLLLLLLLLLLLLLLLLL 
   MMMMMMM           MMMMMMMMMML    MMMMMMMK       LMMMMMMMMMMMMMMMMMMMML   KLMMMMMMMMMMMMMMMMMMMMMMMMM 
   MMMMMMM         MMMMMMMMML       MMMMMMMK     LMMMMMMMMMMMMMMMMMMMMMML  LMMMMMMMMMMMMMMMMMMMMMMMMMMM 
   MMMMMMM      MMMMMMMMMML         MMMMMMMK   LMMMMMMMMMMMMMMMMMMMMMMMML LMMMMMMMMMMMMMMMMMMMMMMMMMMMM 
   MMMMMMM    LMMMMMMMMML           MMMMMMMK  LMMMMMMMMMLLMLLLLLLLLLLLLLL LMMMMMMMLLLLLLLLLLLLLLLLLLLLM 
   MMMMMMM  MMMMMMMMMLM             MMMMMMMK LMMMMMMMM                    LMMMMMML                      
   MMMMMMMLMMMMMMMML                MMMMMMMK MMMMMMML                     LMMMMMMMMLLLLLLLLLLLLLMLL     
   MMMMMMMMMMMMMMMM                 MMMMMMMK MMMMMML                       LMMMMMMMMMMMMMMMMMMMMMMMMML  
   MMMMMMMMMMMMMMMMMM               MMMMMMMK MMMMMMM                         LMMMMMMMMMMMMMMMMMMMMMMMML 
   MMMMMMM KLMMMMMMMMML             MMMMMMMK LMMMMMMM                                          MMMMMMMML
   MMMMMMM    LMMMMMMMMMM           MMMMMMMK LMMMMMMMMLL                                        MMMMMMML
   MMMMMMM      LMMMMMMMMMLL        MMMMMMMK  LMMMMMMMMMMMMMMMMMMMMMMMMML LLLLLLLLLLLLLLLLLLLLMMMMMMMMMM
   MMMMMMM        MMMMMMMMMMML      MMMMMMMK   MMMMMMMMMMMMMMMMMMMMMMMMML LMMMMMMMMMMMMMMMMMMMMMMMMMMMM 
   MMMMMMM          LLMMMMMMMMML    MMMMMMMK     LLMMMMMMMMMMMMMMMMMMMMML LMMMMMMMMMMMMMMMMMMMMMMMMMML  
   MMMMMMM             MMMMMMMMMML  MMMMMMMK         KLMMMMMMMMMMMMMMMMML LMMMMMMMMMMMMMMMMMMMMMMMLK    
                                                                                                            
                                                                                                                                                                                                                                                                                                                        


Scanning with Keeping Infrastructure as Code Secure v2.1.14





Unpinned Actions Full Length Commit SHA, Severity: LOW, Results: 2
Description: Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload. When selecting a SHA, you should verify it is from the action's repository and not a repository fork.
Platform: CICD
CWE: 829
Learn more about this vulnerability: https://docs.kics.io/latest/queries/cicd-queries/555ab8f9-2001-455e-a077-f2d0f41e2fb9

	[1]: .github/workflows/mega-linter.yml:52

		051:       - name: Lint Code Base
		052:         uses: megalinter/megalinter@v9
		053:         env:


	[2]: .github/workflows/awesomebot.yml:17

		016:     - uses: actions/checkout@v5
		017:     - uses: docker://dkhamsing/awesome_bot:latest
		018:       with:



Results Summary:
CRITICAL: 0
HIGH: 0
MEDIUM: 0
LOW: 2
INFO: 0
TOTAL: 2

See detailed reports in MegaLinter artifacts
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

@GabrielNexT
Copy link

Hi, I am traveling and do not have my personal computer with me. O will test the new versions as soon as possible.

This caused a new bug, [128](#128)

This reverts commit 5257af4.

Signed-off-by: Joe Block <[email protected]>
#125 was caused when I
used `_fzf_has()` in fzf-settings.zsh because fzf-zsh-plugin.plugin.zsh
was unsetting that alias after it finished to keep the user's
environment clean of extra functions, and fzf-settings.zsh was getting
loaded later.

Changing to inline `$+commands[name]` then broke using `z` because it
doesn't find aliases, causing [128](#128)

So _this_ fix uses a separate `fzf_settings_has()` function inside
fzf-settings.zsh, which should hopefully solve 125 and 128.

Signed-off-by: Joe Block <[email protected]>
@unixorn unixorn force-pushed the fix-128-broken-alias-checks branch from 14da0ae to 8cbb1ba Compare October 12, 2025 03:40
@unixorn unixorn merged commit 894d146 into main Oct 12, 2025
6 checks passed
@unixorn unixorn added the bugfix Bug Fixes label Oct 12, 2025
@unixorn
Copy link
Owner Author

unixorn commented Oct 12, 2025

@yusiwen, @GabrielNexT and @iliis, this should have fixed your issues. LMK if not.

@unixorn unixorn deleted the fix-128-broken-alias-checks branch October 12, 2025 18:04
@GabrielNexT
Copy link

The error still happens here, but now I can run fzf using ctrl+R.
Maybe my problem is related to Cosmic Terminal, since it is still in beta, later I will investigate the terminal.

/home/gabriel/.oh-my-zsh/custom/plugins/fzf-zsh-plugin/fzf-zsh-plugin.plugin.zsh:78: command not found: _fzf_has
/home/gabriel/.oh-my-zsh/custom/plugins/fzf-zsh-plugin/fzf-zsh-plugin.plugin.zsh:84: command not found: _fzf_has
/home/gabriel/.oh-my-zsh/custom/plugins/fzf-zsh-plugin/fzf-zsh-plugin.plugin.zsh:85: command not found: _fzf_has
_fzf_preview:3: command not found: _fzf_has
_fzf_preview:7: command not found: _fzf_has
/home/gabriel/.oh-my-zsh/custom/plugins/fzf-zsh-plugin/fzf-zsh-plugin.plugin.zsh:145: command not found: _fzf_has
/home/gabriel/.oh-my-zsh/custom/plugins/fzf-zsh-plugin/fzf-zsh-plugin.plugin.zsh:152: command not found: _fzf_has
/home/gabriel/.oh-my-zsh/custom/plugins/fzf-zsh-plugin/fzf-zsh-plugin.plugin.zsh:172: command not found: _fzf_has
/home/gabriel/.oh-my-zsh/custom/plugins/fzf-zsh-plugin/fzf-zsh-plugin.plugin.zsh:193: command not found: _fzf_has
/home/gabriel/.oh-my-zsh/custom/plugins/fzf-zsh-plugin/fzf-zsh-plugin.plugin.zsh:unset:206: no such hash table element: _fzf_has
image

@unixorn
Copy link
Owner Author

unixorn commented Oct 13, 2025

@GabrielNexT try running git pull in your local checkout to force it to update to tip of main, then open a new terminal session so it loads the new version.

@iliis
Copy link

iliis commented Oct 15, 2025

Thank you for investigating this!

I still got the errors, but this was fixed after I deleted the old ~/.fzf.zsh file.

Ctrl-R still doesn't work however. This might be because $FZF_PATH gets set to $HOME/.fzf which does not exist on my machine. I installed fzf through the system repositories (Ubuntu 25.04), so the fzf binary is located at /usr/bin/fzf. I can call fzf to generate the proper bindings by doing source <(fzf --zsh)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants