Skip to content

Bug: Cannot execute some commands at first #2624

@Norodix

Description

@Norodix

RTFM Checklist

  • I have searched exisiting issues / discussions
  • I have read the Wiki including the Advanced section
  • I have read man fzf / I am well versed in shell fzf

Operating system

Linux

Shell

bash

Neovim version (nvim --version)

NVIM v0.11.6 Build type: Release LuaJIT 2.1.1741730670

Fzf version (fzf --version)

0.63.0 (397fe8e3)

Output of :lua print(os.getenv('FZF_DEFAULT_OPTS'))

nil

Is the problem reproducible with mini.sh?

  • My issue is reproducible with mini.sh
  • My issue IS NOT reproducible with mini.sh
  • I have not tested with mini.sh (not relevant, requires LSP, Windows, etc)

Fzf-lua configuration

Describe the bug / steps to reproduce

The changes added in 1f3e985 introduced a bug. I cannot execute :FzfLua without first executing :FzfLua files or some other command.
I get

E5108: Error executing lua: ...ce/.local/share/nvim/lazy/fzf-lua/lua/fzf-lua/config.lua:987: attempt to co
ncatenate a nil value                                                                                     
stack traceback:                                                                                          
        ...ce/.local/share/nvim/lazy/fzf-lua/lua/fzf-lua/config.lua:987: in function 'normalize_opts'     
        ...ence/.local/share/nvim/lazy/fzf-lua/lua/fzf-lua/init.lua:453: in function <...ence/.local/share
/nvim/lazy/fzf-lua/lua/fzf-lua/init.lua:452> 

I have not fully dug into what this change is supposed to do but I can verify that utils.get_info().cmd returns with nil and the concatenation fails afterward. Adding a nil check before the line or just applying tostring to utils.get_info().cmd solved it for me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions