junegunn / fzf

:cherry_blossom: A command-line fuzzy finder

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fish ctrl-t doesn't respect the relative directory with user defined $FZF_CTRL_T_COMMAND

kpskp77 opened this issue · comments

Checklist

  • I have read through the manual page (man fzf)
  • I have searched through the existing issues

Output of fzf --version

0.48 (devel)

OS

  • Linux
  • macOS
  • Windows
  • Etc.

Shell

  • bash
  • zsh
  • fish

Problem / Steps to reproduce

> echo $FZF_CTRL_T_COMMAND
fd --follow --exclude tags --exclude .svn --exclude .git . $dir 2>/dev/null

I think the problem is the variable $dir is not exported in key-bindings.fish

function fzf_key_bindings

  # Store current token in $dir as root for the 'find' command
  function fzf-file-widget -d "List files and folders"
    set -l commandline (__fzf_parse_commandline)
    set -l dir $commandline[1] ## <--- should be `set -lx` here?
    set -l fzf_query $commandline[2]
    set -l prefix $commandline[3]

Maybe you're running into #3684?

Thanks for the report, your analysis is spot on. It should be fixed now.