Skip to content
Discussion options

You must be logged in to vote

Something changed in one of the recent updates. I was overriding the args previously and something changed in how that works since I used to be getting directories back.

Regardless I managed to get it working:

function snacks_find_file()
    local cwd = get_buf_dir()
    local sp = require('snacks.picker')
    sp.files({
        cwd = cwd,
        cmd = 'fd',
        args = { '--hidden', '--follow', '--max-depth', '1', '--type', 'd' },
        actions = {
            confirm = {
                action = function(picker, selected)
                    -- If we have no selection, we want to create a new file
                    if selected.score == 0 then
                        local new_file 

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@WolfeCub
Comment options

@WolfeCub
Comment options

@dpetka2001
Comment options

@WolfeCub
Comment options

Answer selected by WolfeCub
@dpetka2001
Comment options

@WolfeCub
Comment options

@dpetka2001
Comment options

@WolfeCub
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
bug Something isn't working
3 participants
Converted from issue

This discussion was converted from issue #697 on January 21, 2025 21:56.