Aloxaf / fzf-tab

Replace zsh's default completion selection menu with fzf!
MIT License
3.39k stars 96 forks source link

[BUG] TAB key presses are reversed in specific scenarios when using `ftb-tmux-popup` #417

Closed ian-howell closed 9 months ago

ian-howell commented 9 months ago

Describe the bug

Using ftb-tmux-popup, when I hit tab with the cursor at the top of the screen, the popup appears underneath the cursor, and TAB key presses cause the selection to progress down the list. This is the expected behavior.

However if I am focused on a tmux pane that doesn't touch the top of the screen, the ordering is reversed - TAB key presses cause the selection to first wrap around to the bottom of the list, and subsequent presses cause the selection to move up the list.

Maybe worth noting - ctrl-n and ctrl-p work flawlessly in both cases.

See the attached GIF, it probably does a better job of explaining the behavior than I can express in english:

fzf-tab-popup-pad-bug

I can make sure:

Minimal zshrc

autoload -U compinit
compinit

if [[ -s "$HOME/.dotfiles/links/zsh/fzf/fzf-tab.plugin.zsh" ]]; then
    source "$HOME/.dotfiles/links/zsh/fzf/fzf-tab.plugin.zsh"

    zstyle ':fzf-tab:*' fzf-command ftb-tmux-popup
    zstyle ':fzf-tab:*' popup-pad 80 0 # Not actually needed to elicit the bug, but it makes it easier to see
fi

[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh

Log

+fzf-tab-debug:9> : zsh 5.8.1
+fzf-tab-debug:10> zle .fzf-tab-orig-expand-or-complete
+_main_complete:0> -ftb-complete
 +-ftb-complete:1> local -a _ftb_compcap
 +-ftb-complete:2> local -Ua _ftb_groups
 +-ftb-complete:3> local choice choices _ftb_curcontext continuous_trigger print_query accept_line bs=$'\C-B' nul=$'\C-@'
 +-ftb-complete:4> local ret=0
 +-ftb-complete:7> ((  0  ))
 +-ftb-complete:8> COLUMNS=500  +-ftb-complete:8> _ftb__main_complete
  +_ftb__main_complete:1> local IFS=$' \t\n\C-@'
  +_ftb__main_complete:2> eval $'local -A _comp_caller_options;\n             _comp_caller_options=(${(kv)options[@]});\n             setopt localoptions localtraps localpatterns ${_comp_options[@]};\n             local IFS=$\' \\t\\r\\n\\0\';\n             builtin enable -p \\| \\~ \\( \\? \\* \\[ \\< \\^ \\# 2>&-;\n             exec </dev/null;\n             trap - ZERR;\n             local -a reply;\n             local REPLY;\n             local REPORTTIME;\n             unset REPORTTIME'
   +(eval):1> local -A _comp_caller_options
   +(eval):2> _comp_caller_options=( posixargzero off autolist on printexitvalue off kshzerosubscript off histreduceblanks off chaselinks off extendedglob off localloops off histnostore off automenu on globcomplete off unset on listpacked off promptsubst off shwordsplit off pathdirs off kshtypeset off listtypes on warncreateglobal off promptbang off dotglob off braceexpand on listbeep on correctall off privileged off numericglobsort off histverify off trackall on histsubstpattern off globstarshort off cbases off rcquotes off posixaliases off histfindnodups off bashautolist off sharehistory off overstrike off kshautoload off incappendhistory off appendcreate off promptcr on mailwarn off pushdignoredups off interactive on ignoreeof off globsubst off rematchpcre off monitor on histsavebycopy on histbeep on debugbeforecmd on magicequalsubst off rmstarsilent off posixjobs off hashcmds on posixtraps off extendedhistory off notify on kshoptionprint off histexpiredupsfirst off glob on posixcd off braceccl off badpattern on longlistjobs off banghist on dvorak off alwaystoend off hashall on warnnestedvar off globalexport on ksharrays off correct off cdsilent off autonamedirs off histexpand on typesetsilent off rmstarwait off histnofunctions off autoparamslash on trapsasync off sunkeyboardhack off promptsp on histsavenodups off autocd off allexport off posixidentifiers off cshjunkiehistory off autopushd off completeinword off completealiases off aliases on autocontinue off appendhistory on aliasfuncdef off singlelinezle off hashlistall on ignoreclosebraces off recexact off localoptions off interactivecomments off errexit off cshjunkiequotes off markdirs off hashdirs on cdablevars off rcexpandparam off vi off printeightbit off multifuncdef on xtrace on login off cshjunkieloops off histappend on histignorespace off evallineno on shfileexpansion off rcs on functionargzero on errreturn off combiningchars off histignoredups off histfcntllock off beep on autoremoveslash on hup on globdots off checkrunningjobs on autoparamkeys on shnullcmd off multibyte on zle on promptpercent on flowcontrol on continueonerror off incappendhistorytime off autoresume off globassign off caseglob on shortloops on bsdecho off cprecedences off log on transientrprompt off verbose off localpatterns off ignorebraces off pipefail off equals on menucomplete off cshnullglob off casematch on promptvars off histallowclobber off bareglobqual on shinstdin on restricted off pushdminus off nullglob off chasedots off mailwarning off listambiguous on cshnullcmd off bashrematch off octalzeroes off forcefloat off exec on multios on emacs off nomatch on pathscript off localtraps off stdin on onecmd off kshglob off clobber on posixbuiltins off alwayslastprompt on pushdtohome off histignorealldups off hashexecutablesonly off pushdsilent off shoptionletters off physical off sourcetrace off histlexwords off bgnice on globalrcs off posixstrings off checkjobs on shglob off singlecommand off listrowsfirst off )
   +(eval):3> setopt localoptions localtraps localpatterns bareglobqual extendedglob glob multibyte multifuncdef nullglob rcexpandparam unset NO_allexport NO_aliases NO_cshnullglob NO_cshjunkiequotes NO_errexit NO_errreturn NO_globassign NO_globsubst NO_histsubstpattern NO_ignorebraces NO_ignoreclosebraces NO_kshglob NO_ksharrays NO_kshtypeset NO_markdirs NO_octalzeroes NO_posixbuiltins NO_posixidentifiers NO_shwordsplit NO_shglob NO_warnnestedvar NO_warncreateglobal
   +(eval):4> local IFS=$' \t\C-M\n\C-@'
   +(eval):5> enable -p '|' '~' '(' '?' '*' '[' '<' '^' '#'
   +(eval):7> trap - ZERR
   +(eval):8> local -a reply
   +(eval):9> local REPLY
   +(eval):10> local REPORTTIME
   +(eval):11> unset REPORTTIME
  +_ftb__main_complete:3> local func funcs ret=1 tmp _compskip format nm call match min max i num _completers _completer _completer_num curtag _comp_force_list _matchers _matcher _c_matcher _matcher_num _comp_tags _comp_mesg mesg str context state state_descr line opt_args val_args curcontext='' _last_nmatches=-1 _last_menu_style _def_menu_style _menu_style sel _tags_level=0 _saved_exact='' _saved_lastprompt=yes _saved_list=ambiguous _saved_insert=automenu-unambiguous _saved_colors='' _saved_colors_set=0 _ambiguous_color=''
  +_ftb__main_complete:4> local _comp_priv_prefix
  +_ftb__main_complete:5> unset _comp_priv_prefix
  +_ftb__main_complete:6> local -a precommands
  +_ftb__main_complete:7> local -ar builtin_precommands=( - builtin eval exec nocorrect noglob time )
  +_ftb__main_complete:8> typeset -U _lastdescr _comp_ignore _comp_colors
  +_ftb__main_complete:10> [[ -z '' ]]
  +_ftb__main_complete:10> curcontext=:::
  +_ftb__main_complete:11> zstyle -s :completion::::: insert-tab tmp
  +_ftb__main_complete:11> tmp=yes
  +_ftb__main_complete:12> [[ yes = *pending(|[[:blank:]]*) || yes = *pending=(#b)([0-9]##)(|[[:blank:]]*) ]]
  +_ftb__main_complete:17> [[ automenu-unambiguous = tab* ]]
  +_ftb__main_complete:28> [[ '' = \* ]]
  +_ftb__main_complete:34> [[ -z '' ]]
  +_ftb__main_complete:36> [[ -o equals ]]
  +_ftb__main_complete:36> compset -P 1 '='
  +_ftb__main_complete:39> [[ '' != */* && '' = \~ ]]
  +_ftb__main_complete:45> _setup default
   +_setup:3> local val nm=0
   +_setup:5> [[ 1 -eq 1 ]]
   +_setup:5> 2=default
   +_setup:7> zstyle -a :completion:::::default list-colors val
   +_setup:21> [[ default = default ]]
   +_setup:22> unset ZLS_COLORS ZLS_COLOURS
   +_setup:27> zstyle -s :completion:::::default show-ambiguity val
   +_setup:32> zstyle -t :completion:::::default list-packed
   +_setup:34> [[ 2 -eq 1 ]]
   +_setup:37> compstate[list]=ambiguous
   +_setup:40> zstyle -t :completion:::::default list-rows-first
   +_setup:42> [[ 2 -eq 1 ]]
   +_setup:45> compstate[list]=ambiguous
   +_setup:48> zstyle -t :completion:::::default last-prompt
   +_setup:50> [[ 2 -eq 1 ]]
   +_setup:53> compstate[last_prompt]=yes
   +_setup:56> zstyle -t :completion:::::default accept-exact
   +_setup:58> [[ 2 -eq 1 ]]
   +_setup:61> compstate[exact]=''
   +_setup:64> [[ _last_nmatches -ge 0 ]]
   +_setup:67> zstyle -a :completion:::::default menu val
   +_setup:71> _last_nmatches=-1
   +_setup:74> [[ '' != always ]]
   +_setup:75> zstyle -s :completion:::::default force-list val
  +_ftb__main_complete:46> _def_menu_style=( '' )
  +_ftb__main_complete:47> _last_menu_style=( )
  +_ftb__main_complete:48> zstyle -s :completion:::::default list-prompt tmp
  +_ftb__main_complete:53> zstyle -s :completion:::::default select-prompt tmp
  +_ftb__main_complete:58> zstyle -s :completion:::::default select-scroll tmp
  +_ftb__main_complete:63> ((  0  ))
  +_ftb__main_complete:78> zstyle -a :completion::::: completer _completers
  +_ftb__main_complete:78> _completers=( _complete _ignored )
  +_ftb__main_complete:80> _completer_num=1
  +_ftb__main_complete:81> integer SECONDS=0
  +_ftb__main_complete:92> funcs=( )
  +_ftb__main_complete:93> compprefuncs=( )
  +_ftb__main_complete:98> tmp=_complete
  +_ftb__main_complete:100> [[ -n '' ]]
  +_ftb__main_complete:103> [[ _complete = *:-* ]]
  +_ftb__main_complete:107> [[ _complete = *:* ]]
  +_ftb__main_complete:112> _completer=complete
  +_ftb__main_complete:114> curcontext=:complete::
  +_ftb__main_complete:115> zstyle -t :completion::complete::: show-completer
  +_ftb__main_complete:116> zstyle -a :completion::complete::: matcher-list _matchers
  +_ftb__main_complete:116> _matchers=( '' )
  +_ftb__main_complete:117> _matcher_num=1
  +_ftb__main_complete:118> _matcher=''
  +_ftb__main_complete:119> _c_matcher=
  +_ftb__main_complete:121> [[ '' == +* ]]
  +_ftb__main_complete:125> _matcher=''
  +_ftb__main_complete:127> _comp_mesg=''
  +_ftb__main_complete:128> [[ -n '' ]]
  +_ftb__main_complete:135> _complete
   +_complete:7> local comp name oldcontext ret=1 service
   +_complete:8> typeset -T curcontext=:complete:: ccarray
   +_complete:10> oldcontext=:complete::
   +_complete:14> [[ -n '' ]]
   +_complete:96> comp=_first
   +_complete:97> [[ -n _first ]]
   +_complete:98> service=-first-
   +_complete:99> ccarray[3]=-first-
   +_complete:100> eval _first
    +(eval):1> _first
   +_complete:100> ret=0
   +_complete:101> [[ '' = all ]]
   +_complete:110> [[ -n '' ]]
   +_complete:114> ret=1
   +_complete:115> [[ command = command ]]
   +_complete:116> curcontext=:complete::
   +_complete:117> _normal -s
    +_normal:3> local _comp_command1 _comp_command2 _comp_command precommand
    +_normal:4> local -A opts
    +_normal:6> zparseopts -A opts -D - P 'p+:-=precommand' s
    +_normal:7> ((  1  ))
    +_normal:8> ((  0  ))
    +_normal:9> ((  0  ))
    +_normal:15> [[ -o BANG_HIST && '' = !*: || '' = "!*: ]]
    +_normal:28> [[ CURRENT -eq 1 ]]
    +_normal:37> _set_command
     +_set_command:6> local command
     +_set_command:8> command=cd
     +_set_command:10> [[ -z cd ]]
     +_set_command:12> ((  1 + 0  ))
     +_set_command:13> _comp_command1=cd
     +_set_command:14> _comp_command=cd
    +_normal:39> _dispatch -s cd cd '' -default-
     +_dispatch:3> local comp pat val name i ret=1 _compskip=''
     +_dispatch:4> local curcontext=:complete:: service str noskip
     +_dispatch:5> local -a match mbegin mend
     +_dispatch:9> [[ -s = -s ]]
     +_dispatch:10> noskip=yes
     +_dispatch:11> shift
     +_dispatch:14> [[ -z yes ]]
     +_dispatch:16> curcontext=:complete:cd:
     +_dispatch:18> shift
     +_dispatch:22> [[ '' != (all|*patterns*) ]]
     +_dispatch:24> str=cd
     +_dispatch:25> [[ -n cd ]]
     +_dispatch:26> service=cd
     +_dispatch:24> str=
     +_dispatch:25> [[ -n '' ]]
     +_dispatch:25> continue
     +_dispatch:24> str=-default-
     +_dispatch:25> [[ -n -default- ]]
     +_dispatch:26> service=-default-
     +_dispatch:45> ret=1
     +_dispatch:46> str=cd
     +_dispatch:47> [[ -n cd ]]
     +_dispatch:51> str=cd
     +_dispatch:52> name=cd
     +_dispatch:53> comp=_cd
     +_dispatch:54> service=cd
     +_dispatch:56> [[ -z _cd ]]
     +_dispatch:56> break
     +_dispatch:61> [[ -n _cd && cd != -default- ]]
     +_dispatch:62> _compskip=patterns
     +_dispatch:63> eval _cd
      +(eval):1> _cd
       +_cd:22> setopt localoptions nonomatch
       +_cd:24> local expl ret=1 curarg
       +_cd:25> integer argstart=2 noopts match mbegin mend
       +_cd:27> ((  CURRENT > 1  ))
       +_cd:30> [[ '' = -* ]]
       +_cd:38> [[ CURRENT -eq 3 ]]
       +_cd:49> [[ '' == (#b)(\~|)[^/]# && -n '' || CURRENT -gt 1 && ! -o cdablevars ]]
       +_cd:51> _directory_stack
        +_directory_stack:8> setopt localoptions nonomatch
        +_directory_stack:10> local expl list lines revlines disp sep
        +_directory_stack:15> [[ '' = [-+]* ]]
        +_directory_stack:15> return 1
       +_cd:54> local -a tmpWpath
       +_cd:55> [[ '' = (|*/)../* ]]
       +_cd:66> [[ '' != (\~|/|./|../)* && '' != ../* ]]
       +_cd:67> local tmpcdpath alt
       +_cd:69> alt=( )
       +_cd:71> tmpcdpath=( )
       +_cd:73> ((  0  ))
       +_cd:77> [[ -o cdablevars ]]
       +_cd:102> [[ CURRENT -ne 1 ]]
       +_cd:103> alt=( 'local-directories:local directory:_path_files  -/' )
       +_cd:105> [[ CURRENT -eq argstart && noopts -eq 0 && '' = -* ]]
       +_cd:110> _alternative 'local-directories:local directory:_path_files  -/'
        +_alternative:3> local tags def expl descr action mesgs nm=0 subopts
        +_alternative:4> local opt ws curcontext=:complete:cd:
        +_alternative:6> subopts=( )
        +_alternative:7> getopts O:C: opt
        +_alternative:14> shift OPTIND-1
        +_alternative:16> [[ 'local-directories:local directory:_path_files  -/' = -(|-) ]]
        +_alternative:18> mesgs=( )
        +_alternative:20> _tags local-directories
         +_tags:3> local prev
         +_tags:10> [[ local-directories = -- ]]
         +_tags:15> ((  1  ))
         +_tags:19> local curcontext=:complete:cd: order tag nodef tmp
         +_tags:21> [[ local-directories = -C?* ]]
         +_tags:24> [[ local-directories = -C ]]
         +_tags:29> [[ local-directories = -(|-) ]]
         +_tags:31> zstyle -a :completion::complete:cd:: group-order order
         +_tags:36> comptags -i :complete:cd: local-directories
         +_tags:40> [[ -n '' ]]
         +_tags:43> zstyle -a :completion::complete:cd:: tag-order order
         +_tags:44> ((  ! 0  ))
         +_tags:55> [[ -z '' ]]
         +_tags:55> comptry local-directories
         +_tags:60> comptags -T
         +_tags:62> return
        +_alternative:22> _tags
         +_tags:3> local prev
         +_tags:10> [[ '' = -- ]]
         +_tags:15> ((  0  ))
         +_tags:67> comptags -N
        +_alternative:23> def=local-directories:local directory:_path_files  -/
        +_alternative:24> _requested local-directories
         +_requested:3> local __gopt
         +_requested:5> __gopt=( )
         +_requested:6> zparseopts -D -a __gopt 1 2 V J x
         +_requested:8> comptags -R local-directories
         +_requested:9> [[ 1 -gt 3 ]]
         +_requested:11> [[ 1 -gt 1 ]]
         +_requested:14> return 0
        +_alternative:25> descr='local directory'
        +_alternative:26> action='_path_files  -/'
        +_alternative:28> _description local-directories expl 'local directory'
         +_description:3> local name nopt xopt format gname hidden hide match opts tag
         +_description:4> local -a ign gropt sort
         +_description:6> opts=( )
         +_description:8> xopt=( -X )
         +_description:9> nopt=( )
         +_description:10> zparseopts -K -D -a nopt 1 2 'V=gropt' 'J=ign' 'x=xopt'
         +_description:12> 3='local directory'
         +_description:13> [[ -n 'local directory' ]]
         +_description:13> _lastdescr=( '' 'local directory' )
         +_description:15> zstyle -s :completion::complete:cd::local-directories group-name gname
         +_description:18> _setup local-directories -default-
          +_setup:3> local val nm=0
          +_setup:5> [[ 2 -eq 1 ]]
          +_setup:7> zstyle -a :completion::complete:cd::local-directories list-colors val
          +_setup:21> [[ local-directories = default ]]
          +_setup:27> zstyle -s :completion::complete:cd::local-directories show-ambiguity val
          +_setup:32> zstyle -t :completion::complete:cd::local-directories list-packed
          +_setup:34> [[ 2 -eq 1 ]]
          +_setup:37> compstate[list]=ambiguous
          +_setup:40> zstyle -t :completion::complete:cd::local-directories list-rows-first
          +_setup:42> [[ 2 -eq 1 ]]
          +_setup:45> compstate[list]=ambiguous
          +_setup:48> zstyle -t :completion::complete:cd::local-directories last-prompt
          +_setup:50> [[ 2 -eq 1 ]]
          +_setup:53> compstate[last_prompt]=yes
          +_setup:56> zstyle -t :completion::complete:cd::local-directories accept-exact
          +_setup:58> [[ 2 -eq 1 ]]
          +_setup:61> compstate[exact]=''
          +_setup:64> [[ _last_nmatches -ge 0 ]]
          +_setup:67> zstyle -a :completion::complete:cd::local-directories menu val
          +_setup:71> _last_nmatches=-1
          +_setup:74> [[ '' != always ]]
          +_setup:75> zstyle -s :completion::complete:cd::local-directories force-list val
         +_description:20> name=expl
         +_description:22> zstyle -s :completion::complete:cd::local-directories format format
         +_description:23> zstyle -s :completion::complete:cd::descriptions format format
         +_description:25> zstyle -s :completion::complete:cd::local-directories hidden hidden
         +_description:30> zstyle -s :completion::complete:cd::local-directories matcher match
         +_description:32> [[ -n '' ]]
         +_description:36> [[ -z '' ]]
         +_description:37> zstyle -a :completion::complete:cd::local-directories sort sort
         +_description:38> zstyle -a :completion::complete:cd:: sort sort
         +_description:50> [[ -z '' ]]
         +_description:51> zstyle -a :completion::complete:cd::local-directories ignored-patterns _comp_ignore
         +_description:52> _comp_ignore=( )
         +_description:54> zstyle -s :completion::complete:cd::local-directories ignore-line hidden
         +_description:70> ((  0  ))
         +_description:75> tag=local-directories
         +_description:77> shift 2
         +_description:78> [[ -z 'local directory' ]]
         +_description:80> [[ -n '' ]]
         +_description:84> [[ -n '' ]]
         +_description:91> [[ -n '' ]]
         +_description:94> set -A expl -J -default-
         +_description:98> ((  0  ))
         +_description:99> local fakestyle descr
         +_description:100> fakestyle=fake
         +_description:101> zstyle -a :completion::complete:cd::local-directories fake match
         +_description:102> continue
         +_description:100> fakestyle=fake-always
         +_description:101> zstyle -a :completion::complete:cd::local-directories fake-always match
         +_description:102> continue
         +_description:115> return 0
        +_alternative:30> [[ '_path_files  -/' = \ # ]]
        +_alternative:35> [[ '_path_files  -/' = \(\(*\)\) ]]
        +_alternative:42> [[ '_path_files  -/' = \(*\) ]]
        +_alternative:50> [[ '_path_files  -/' = {*} ]]
        +_alternative:57> [[ '_path_files  -/' = \ * ]]
        +_alternative:69> eval 'action=( _path_files  -/ )'
         +(eval):1> action=( _path_files -/ )
        +_alternative:70> _next_label local-directories expl 'local directory'
         +_next_label:3> local __gopt __descr __spec
         +_next_label:5> __gopt=( )
         +_next_label:6> zparseopts -D -a __gopt 1 2 V J x
         +_next_label:8> comptags -A local-directories curtag __spec
         +_next_label:9> ((  11 > _tags_level  ))
         +_next_label:9> _comp_tags=''
         +_next_label:10> _tags_level=11
         +_next_label:11> _comp_tags=' local-directories '
         +_next_label:12> [[ local-directories = *[^\\]:* ]]
         +_next_label:18> _description local-directories expl 'local directory'
          +_description:3> local name nopt xopt format gname hidden hide match opts tag
          +_description:4> local -a ign gropt sort
          +_description:6> opts=( )
          +_description:8> xopt=( -X )
          +_description:9> nopt=( )
          +_description:10> zparseopts -K -D -a nopt 1 2 'V=gropt' 'J=ign' 'x=xopt'
          +_description:12> 3='local directory'
          +_description:13> [[ -n 'local directory' ]]
          +_description:13> _lastdescr=( '' 'local directory' 'local directory' )
          +_description:15> zstyle -s :completion::complete:cd::local-directories group-name gname
          +_description:18> _setup local-directories -default-
           +_setup:3> local val nm=0
           +_setup:5> [[ 2 -eq 1 ]]
           +_setup:7> zstyle -a :completion::complete:cd::local-directories list-colors val
           +_setup:21> [[ local-directories = default ]]
           +_setup:27> zstyle -s :completion::complete:cd::local-directories show-ambiguity val
           +_setup:32> zstyle -t :completion::complete:cd::local-directories list-packed
           +_setup:34> [[ 2 -eq 1 ]]
           +_setup:37> compstate[list]=ambiguous
           +_setup:40> zstyle -t :completion::complete:cd::local-directories list-rows-first
           +_setup:42> [[ 2 -eq 1 ]]
           +_setup:45> compstate[list]=ambiguous
           +_setup:48> zstyle -t :completion::complete:cd::local-directories last-prompt
           +_setup:50> [[ 2 -eq 1 ]]
           +_setup:53> compstate[last_prompt]=yes
           +_setup:56> zstyle -t :completion::complete:cd::local-directories accept-exact
           +_setup:58> [[ 2 -eq 1 ]]
           +_setup:61> compstate[exact]=''
           +_setup:64> [[ _last_nmatches -ge 0 ]]
           +_setup:67> zstyle -a :completion::complete:cd::local-directories menu val
           +_setup:71> _last_nmatches=-1
           +_setup:74> [[ '' != always ]]
           +_setup:75> zstyle -s :completion::complete:cd::local-directories force-list val
          +_description:20> name=expl
          +_description:22> zstyle -s :completion::complete:cd::local-directories format format
          +_description:23> zstyle -s :completion::complete:cd::descriptions format format
          +_description:25> zstyle -s :completion::complete:cd::local-directories hidden hidden
          +_description:30> zstyle -s :completion::complete:cd::local-directories matcher match
          +_description:32> [[ -n '' ]]
          +_description:36> [[ -z '' ]]
          +_description:37> zstyle -a :completion::complete:cd::local-directories sort sort
          +_description:38> zstyle -a :completion::complete:cd:: sort sort
          +_description:50> [[ -z '' ]]
          +_description:51> zstyle -a :completion::complete:cd::local-directories ignored-patterns _comp_ignore
          +_description:52> _comp_ignore=( )
          +_description:54> zstyle -s :completion::complete:cd::local-directories ignore-line hidden
          +_description:70> ((  0  ))
          +_description:75> tag=local-directories
          +_description:77> shift 2
          +_description:78> [[ -z 'local directory' ]]
          +_description:80> [[ -n '' ]]
          +_description:84> [[ -n '' ]]
          +_description:91> [[ -n '' ]]
          +_description:94> set -A expl -J -default-
          +_description:98> ((  0  ))
          +_description:99> local fakestyle descr
          +_description:100> fakestyle=fake
          +_description:101> zstyle -a :completion::complete:cd::local-directories fake match
          +_description:102> continue
          +_description:100> fakestyle=fake-always
          +_description:101> zstyle -a :completion::complete:cd::local-directories fake-always match
          +_description:102> continue
          +_description:115> return 0
         +_next_label:19> set -A expl -J -default-
         +_next_label:22> return 0
        +_alternative:71> _path_files -J -default- -/
         +_path_files:3> local -a match mbegin mend
         +_path_files:5> local splitchars
         +_path_files:6> zstyle -s :completion::complete:cd:: file-split-chars splitchars
         +_path_files:22> _have_glob_qual
          +_have_glob_qual:14> local complete
          +_have_glob_qual:16> [[ '' = complete ]]
          +_have_glob_qual:18> [[ -z '' && on == on && '' = (#b)(((*[^\\\$]|)(\\\\)#)\()([^\)\|\~]#) || off == on ]]
         +_path_files:44> local linepath realpath donepath prepath testpath exppath skips skipped
         +_path_files:45> local tmp1 tmp2 tmp3 tmp4 i orig eorig pre suf tpre tsuf opre osuf cpre
         +_path_files:46> local pats haspats ignore pfx pfxsfx sopt gopt opt sdirs ignpar cfopt listsfx
         +_path_files:47> local nm=0 menu matcher mopts sort mid accex fake
         +_path_files:48> local listfiles listopts tmpdisp origtmp1 Uopt
         +_path_files:49> local accept_exact_dirs path_completion
         +_path_files:50> integer npathcheck
         +_path_files:51> local -a Mopts
         +_path_files:53> typeset -U prepaths exppaths
         +_path_files:55> exppaths=( )
         +_path_files:59> zparseopts -a mopts 'P:=pfx' 'S:=pfxsfx' 'q=pfxsfx' 'r:=pfxsfx' 'R:=pfxsfx' 'W:=prepaths' 'F:=ignore' 'M+:=matcher' J+: V+: x+: X+: 1 2 o+: n 'f=tmp1' '/=tmp1' 'g+:-=tmp1'
         +_path_files:64> sopt=-/
         +_path_files:65> ((  1  ))
         +_path_files:65> haspats=yes
         +_path_files:66> ((  0  ))
         +_path_files:67> ((  1  ))
         +_path_files:68> pats=''
         +_path_files:69> pats=( '*(-/)' )
         +_path_files:74> pats=( '*(-/)' )
         +_path_files:76> ((  0  ))
         +_path_files:80> ((  0  ))
         +_path_files:92> prepaths=( '' )
         +_path_files:95> ((  0  ))
         +_path_files:106> [[ -/ = -(f|) ]]
         +_path_files:115> ((  ! 1  ))
         +_path_files:136> [[ -z '' && 0 -eq 0 && -z '' && -n '' ]]
         +_path_files:140> ((  0  ))
         +_path_files:145> [[ 0 -eq 0 && -o nocaseglob ]]
         +_path_files:151> ((  0  ))
         +_path_files:156> zstyle -s :completion::complete:cd:: file-sort tmp1
         +_path_files:191> zstyle -t :completion::complete:cd::paths squeeze-slashes
         +_path_files:194> skips='((.|..)/)##'
         +_path_files:197> zstyle -s :completion::complete:cd::paths special-dirs sdirs
         +_path_files:198> zstyle -t :completion::complete:cd::paths list-suffixes
         +_path_files:201> [[ '*(-/)' = ((|*[[:blank:]])\*(|[[:blank:]]*|\([^[:blank:]]##\))|*\([^[:blank:]]#/[^[:blank:]]#\)*) ]]
         +_path_files:202> sopt=-//
         +_path_files:204> zstyle -a :completion::complete:cd::paths accept-exact accex
         +_path_files:205> zstyle -a :completion::complete:cd:: fake-files fake
         +_path_files:207> zstyle -s :completion::complete:cd:: ignore-parents ignpar
         +_path_files:209> zstyle -t :completion::complete:cd::paths accept-exact-dirs
         +_path_files:211> zstyle -T :completion::complete:cd::paths path-completion
         +_path_files:212> path_completion=1
         +_path_files:214> [[ -n '' ]]
         +_path_files:242> pre=''
         +_path_files:243> suf=''
         +_path_files:244> opre=''
         +_path_files:245> osuf=''
         +_path_files:246> orig=''
         +_path_files:247> eorig=''
         +_path_files:249> [[ automenu-unambiguous = (*menu|[0-9]*) || -n '' || -n '' ]]
         +_path_files:252> [[ -n '' ]]
         +_path_files:256> Mopts=( -M 'r:|/=* r:|=*' )
         +_path_files:261> [[ '' = [^][*?#^\|\<\>\\]#(`[^`]#`|\$)*/* ]]
         +_path_files:282> [[ '' = \~ ]]
         +_path_files:332> linepath=''
         +_path_files:333> realpath=''
         +_path_files:335> zstyle -s :completion::complete:cd:: preserve-prefix tmp1
         +_path_files:343> [[ '' = / ]]
         +_path_files:356> [[ '' = (.|..)/* ]]
         +_path_files:357> donepath=''
         +_path_files:364> prepath=
         +_path_files:370> skipped=''
         +_path_files:371> cpre=''
         +_path_files:373> [[ -n '' || -z 1 ]]
         +_path_files:412> tpre=''
         +_path_files:413> tsuf=''
         +_path_files:421> testpath=''
         +_path_files:423> tmp2=''
         +_path_files:424> tpre=''
         +_path_files:426> tmp1=( '' )
         +_path_files:429> ((  npathcheck = 0  ))
         +_path_files:430> true
         +_path_files:432> origtmp1=( '' )
         +_path_files:435> [[ '' = */* ]]
         +_path_files:439> PREFIX=''
         +_path_files:440> SUFFIX=''
         +_path_files:452> tmp2=( '' )
         +_path_files:454> [[ '' = (#b)*/(*) ]]
         +_path_files:467> [[ -// = *[/f]* ]]
         +_path_files:468> compfiles -p tmp1 accex '' ' ' '' fake '*(-/)'
         +_path_files:472> tmp1=( go nc-devbox notes src )
         +_path_files:474> [[ -n '' ]]
         +_path_files:546> ((  ! 4  ))
         +_path_files:575> [[ -n '' ]]
         +_path_files:589> [[ '' = */* ]]
         +_path_files:591> [[ '' = */* ]]
         +_path_files:595> break
         +_path_files:614> tmp3=''
         +_path_files:615> tpre=''
         +_path_files:616> tsuf=''
         +_path_files:617> [[ -n '' ]]
         +_path_files:627> true
         +_path_files:634> compfiles -r tmp1 ''
         +_path_files:635> tmp4=1
         +_path_files:637> [[ '' = */* ]]
         +_path_files:642> tmp2=''
         +_path_files:643> PREFIX=''
         +_path_files:644> SUFFIX=''
         +_path_files:651> ((  tmp4  ))
         +_path_files:660> tmp2=''
         +_path_files:661> [[ -n '' ]]
         +_path_files:663> [[ -n '' ]]
         +_path_files:667> compquote tmp1 tmp2
         +_path_files:670> [[ -z '' && '' = \* ]]
         +_path_files:680> [[ -z automenu-unambiguous ]]
         +_path_files:681> zstyle -t :completion::complete:cd::paths expand suffix
         +_path_files:682> [[ -z '' && -n '' || -z '' ]]
         +_path_files:688> ((  tmp4  ))
         +_path_files:688> zstyle -t :completion::complete:cd::paths ambiguous
         +_path_files:690> [[ '' = */* ]]
         +_path_files:716> _list_files tmp1 ''
          +_list_files:11> local stat f elt what dir
          +_list_files:12> local -a stylevals
          +_list_files:13> integer ok
          +_list_files:15> listfiles=( )
          +_list_files:16> listopts=( )
          +_list_files:18> zstyle -a :completion::complete:cd:: file-list stylevals
          +_list_files:18> return 1
         +_path_files:717> compadd -Qf -J -default- -p '' -s '' -W '' -M 'r:|/=* r:|=*' -a tmp1
          +compadd:1> local -A apre hpre dscrs _oad _mesg
          +compadd:2> local -a isfile _opts __ expl
          +compadd:3> zparseopts -E -a _opts 'P:=apre' 'p:=hpre' 'd:=dscrs' 'X+:=expl' 'O:=_oad' 'A:=_oad' 'D:=_oad' 'f=isfile' i: S: s: I: 'x:=_mesg' r: R: W: F: M+: E: q e Q n U C 'J:=__' 'V:=__' 'a=__' 'l=__' 'k=__' 'o=__' '1=__' '2=__'
          +compadd:4> _ftb_curcontext=complete:cd:
          +compadd:5> ((  0 != 0 || ! IN_FZF_TAB  ))
          +compadd:6> -ftb-zstyle -m disabled-on any
           +-ftb-zstyle:1> zstyle -m :fzf-tab:complete:cd: disabled-on any
          +compadd:9> -ftb-zstyle -m disabled-on files
           +-ftb-zstyle:1> zstyle -m :fzf-tab:complete:cd: disabled-on files
          +compadd:16> local -a __hits __dscr
          +compadd:17> ((  0 == 1  ))
          +compadd:21> compadd -A __hits -D __dscr -Qf -J -default- -p '' -s '' -W '' -M 'r:|/=* r:|=*' -a tmp1
          +compadd:22> local ret=1
          +compadd:23> ((  4 == 0  ))
          +compadd:31> expl=''
          +compadd:32> [[ -n '' ]]
          +compadd:33> local -a keys=( apre hpre PREFIX SUFFIX IPREFIX ISUFFIX )
          +compadd:34> local key expanded __tmp_value=$'<\C-@>'
          +compadd:35> key=apre
          +compadd:37> expanded=''
          +compadd:38> [[ -n '' ]]
          +compadd:35> key=hpre
          +compadd:37> expanded=''
          +compadd:38> [[ -n '' ]]
          +compadd:35> key=PREFIX
          +compadd:37> expanded=''
          +compadd:38> [[ -n '' ]]
          +compadd:35> key=SUFFIX
          +compadd:37> expanded=''
          +compadd:38> [[ -n '' ]]
          +compadd:35> key=IPREFIX
          +compadd:37> expanded=''
          +compadd:38> [[ -n '' ]]
          +compadd:35> key=ISUFFIX
          +compadd:37> expanded=''
          +compadd:38> [[ -n '' ]]
          +compadd:43> [[ -n '' ]]
          +compadd:47> [[ -n -f ]]
          +compadd:49> __tmp_value+=$'\C-@realdir\C-@'
          +compadd:51> _opts+=( -p '' -f )
          +compadd:52> __tmp_value+=$'\C-@args\C-@-Q\C-A-s\C-A\C-A-W\C-A\C-A-M\C-Ar:|/=* r:|=*\C-A-p\C-A\C-A-f'
          +compadd:53> ((  0  ))
          +compadd:57> local dscr word i
          +compadd:58> i=1
          +compadd:60> word=go dscr=''
          +compadd:61> [[ -n '' ]]
          +compadd:64> [[ -n go ]]
          +compadd:66> dscr=go
          +compadd:68> _ftb_compcap+=$'go\C-B<\C-@>\C-@realdir\C-@\C-@args\C-@-Q\C-A-s\C-A\C-A-W\C-A\C-A-M\C-Ar:|/=* r:|=*\C-A-p\C-A\C-A-f\C-@word\C-@go'
          +compadd:58> i=2
          +compadd:60> word=nc-devbox dscr=''
          +compadd:61> [[ -n '' ]]
          +compadd:64> [[ -n nc-devbox ]]
          +compadd:66> dscr=nc-devbox
          +compadd:68> _ftb_compcap+=$'nc-devbox\C-B<\C-@>\C-@realdir\C-@\C-@args\C-@-Q\C-A-s\C-A\C-A-W\C-A\C-A-M\C-Ar:|/=* r:|=*\C-A-p\C-A\C-A-f\C-@word\C-@nc-devbox'
          +compadd:58> i=3
          +compadd:60> word=notes dscr=''
          +compadd:61> [[ -n '' ]]
          +compadd:64> [[ -n notes ]]
          +compadd:66> dscr=notes
          +compadd:68> _ftb_compcap+=$'notes\C-B<\C-@>\C-@realdir\C-@\C-@args\C-@-Q\C-A-s\C-A\C-A-W\C-A\C-A-M\C-Ar:|/=* r:|=*\C-A-p\C-A\C-A-f\C-@word\C-@notes'
          +compadd:58> i=4
          +compadd:60> word=src dscr=''
          +compadd:61> [[ -n '' ]]
          +compadd:64> [[ -n src ]]
          +compadd:66> dscr=src
          +compadd:68> _ftb_compcap+=$'src\C-B<\C-@>\C-@realdir\C-@\C-@args\C-@-Q\C-A-s\C-A\C-A-W\C-A\C-A-M\C-Ar:|/=* r:|=*\C-A-p\C-A\C-A-f\C-@word\C-@src'
          +compadd:71> compadd -U -qS '' -R -ftb-remove-space ''
         +_path_files:754> tmp4=-
         +_path_files:756> break
         +_path_files:800> [[ -z - ]]
         +_path_files:886> [[ _matcher_num -eq 1 ]]
         +_path_files:887> zstyle -t :completion::complete:cd::paths expand prefix
         +_path_files:895> [[ nm -ne 'compstate[nmatches]' ]]
        +_alternative:70> _next_label local-directories expl 'local directory'
         +_next_label:3> local __gopt __descr __spec
         +_next_label:5> __gopt=( )
         +_next_label:6> zparseopts -D -a __gopt 1 2 V J x
         +_next_label:8> comptags -A local-directories curtag __spec
         +_next_label:25> return 1
        +_alternative:76> [[ nm -ne 'compstate[nmatches]' ]]
        +_alternative:76> return 0
       +_cd:110> ret=0
       +_cd:112> return ret
     +_dispatch:63> ret=0
     +_dispatch:64> [[ patterns = (all|*patterns*) ]]
     +_dispatch:64> return ret
   +_complete:117> ret=0
   +_complete:142> _compskip=''
   +_complete:144> return ret
  +_ftb__main_complete:137> ret=0
  +_ftb__main_complete:138> break 2
  +_ftb__main_complete:145> curcontext=:::
  +_ftb__main_complete:146> [[ '' = keep ]]
  +_ftb__main_complete:150> nm=1
  +_ftb__main_complete:152> [[ '' = keep || nm -gt 1 ]]
  +_ftb__main_complete:277> [[ nm -lt 1 ]]
  +_ftb__main_complete:281> [[ nm -eq 0 ]]
  +_ftb__main_complete:295> [[ -n '' ]]
  +_ftb__main_complete:301> [[ '' = always || '' = ?* ]]
  +_ftb__main_complete:303> [[ '' = keep ]]
  +_ftb__main_complete:311> ((  0  ))
  +_ftb__main_complete:315> unset ZLS_COLORS
  +_ftb__main_complete:318> funcs=( )
  +_ftb__main_complete:319> comppostfuncs=( )
  +_ftb__main_complete:324> _lastcomp=( list_lines 1 all_quotes '\' nmatches 1 restore auto context command vared '' unambiguous '' list_max 100 unambiguous_cursor 1 list ambiguous insert_positions 3 unambiguous_positions 0 exact '' to_end match last_prompt yes pattern_insert menu ignored 0 insert automenu-unambiguous )
  +_ftb__main_complete:325> _lastcomp[nmatches]=1
  +_ftb__main_complete:326> _lastcomp[completer]=complete
  +_ftb__main_complete:327> _lastcomp[prefix]=''
  +_ftb__main_complete:328> _lastcomp[suffix]=''
  +_ftb__main_complete:329> _lastcomp[iprefix]=''
  +_ftb__main_complete:330> _lastcomp[isuffix]=''
  +_ftb__main_complete:331> _lastcomp[qiprefix]=''
  +_ftb__main_complete:332> _lastcomp[qisuffix]=''
  +_ftb__main_complete:333> _lastcomp[tags]=' local-directories '
  +_ftb__main_complete:334> return ret
 +-ftb-complete:9> ((  0  ))
 +-ftb-complete:11> emulate -L zsh -o extended_glob
 +-ftb-complete:13> local _ftb_query _ftb_complist=( ) _ftb_headers=( ) command opts
 +-ftb-complete:14> -ftb-generate-complist
  +-ftb-generate-complist:3> local dsuf dpre k _v filepath first_word show_group default_color prefix bs=$'\C-H'
  +-ftb-generate-complist:4> local -a list_colors group_colors tcandidates reply match mbegin mend
  +-ftb-generate-complist:5> local -i same_word=1 colorful=0
  +-ftb-generate-complist:6> local -Ua duplicate_groups=( )
  +-ftb-generate-complist:7> local -A word_map=( )
  +-ftb-generate-complist:9> ((  4 == 0  ))
  +-ftb-generate-complist:11> -ftb-zstyle -s show-group show_group
   +-ftb-zstyle:1> zstyle -s :fzf-tab:complete:cd: show-group show_group
  +-ftb-generate-complist:11> show_group=full
  +-ftb-generate-complist:12> -ftb-zstyle -s default-color default_color
   +-ftb-zstyle:1> zstyle -s :fzf-tab:complete:cd: default-color default_color
  +-ftb-generate-complist:12> default_color=$'\C-[[37m'
  +-ftb-generate-complist:13> -ftb-zstyle -s prefix prefix
   +-ftb-zstyle:1> zstyle -s :fzf-tab:complete:cd: prefix prefix
  +-ftb-generate-complist:14> zstyle -m ':completion:*:descriptions' format '*'
  +-ftb-generate-complist:16> -ftb-zstyle -a group-colors group_colors
   +-ftb-zstyle:1> zstyle -a :fzf-tab:complete:cd: group-colors group_colors
  +-ftb-generate-complist:16> group_colors=( $'\C-[[94m' $'\C-[[32m' $'\C-[[33m' $'\C-[[35m' $'\C-[[31m' $'\C-[[38;5;27m' $'\C-[[36m' $'\C-[[38;5;100m' $'\C-[[38;5;98m' $'\C-[[91m' $'\C-[[38;5;80m' $'\C-[[92m' $'\C-[[38;5;214m' $'\C-[[38;5;165m' $'\C-[[38;5;124m' $'\C-[[38;5;120m' )
  +-ftb-generate-complist:17> zstyle -a :completion:complete:cd: list-colors list_colors
  +-ftb-generate-complist:20> ((  0  ))
  +-ftb-generate-complist:23> local -A namecolors=( )
  +-ftb-generate-complist:24> local -A modecolors=( )
  +-ftb-generate-complist:25> ((  0 == 0 && 0 == 0  ))
  +-ftb-generate-complist:25> list_colors=( )
  +-ftb-generate-complist:28> ((  0 == 1  ))
  +-ftb-generate-complist:33> ((  0  ))
  +-ftb-generate-complist:36> k=go
  +-ftb-generate-complist:36> _v=< > realdir  args -Q-s-W-Mr:|/=* r:|=*-p-f word go
  +-ftb-generate-complist:37> local -A v=( '<' '>' realdir '' args $'-Q\C-A-s\C-A\C-A-W\C-A\C-A-M\C-Ar:|/=* r:|=*\C-A-p\C-A\C-A-f' word go )
  +-ftb-generate-complist:38> [[ go == go ]]
  +-ftb-generate-complist:41> dsuf='' dpre=''
  +-ftb-generate-complist:42> ((  1  ))
  +-ftb-generate-complist:43> filepath=go
  +-ftb-generate-complist:44> [[ -d go ]]
  +-ftb-generate-complist:45> dsuf=/
  +-ftb-generate-complist:49> ((  0  ))
  +-ftb-generate-complist:52> [[ -L go ]]
  +-ftb-generate-complist:55> [[ on == off ]]
  +-ftb-generate-complist:61> ((  0  ))
  +-ftb-generate-complist:67> tcandidates+=$'\C-[[37m\C-@go\C-@/'
  +-ftb-generate-complist:71> [[ full == brief ]]
  +-ftb-generate-complist:36> k=nc-devbox
  +-ftb-generate-complist:36> _v=< > realdir  args -Q-s-W-Mr:|/=* r:|=*-p-f word nc-devbox
  +-ftb-generate-complist:37> local -A v=( '<' '>' realdir '' args $'-Q\C-A-s\C-A\C-A-W\C-A\C-A-M\C-Ar:|/=* r:|=*\C-A-p\C-A\C-A-f' word nc-devbox )
  +-ftb-generate-complist:38> [[ nc-devbox == go ]]
  +-ftb-generate-complist:38> same_word=0
  +-ftb-generate-complist:41> dsuf='' dpre=''
  +-ftb-generate-complist:42> ((  1  ))
  +-ftb-generate-complist:43> filepath=nc-devbox
  +-ftb-generate-complist:44> [[ -d nc-devbox ]]
  +-ftb-generate-complist:45> dsuf=/
  +-ftb-generate-complist:49> ((  0  ))
  +-ftb-generate-complist:52> [[ -L nc-devbox ]]
  +-ftb-generate-complist:55> [[ on == off ]]
  +-ftb-generate-complist:61> ((  0  ))
  +-ftb-generate-complist:67> tcandidates+=$'\C-[[37m\C-@nc-devbox\C-@/'
  +-ftb-generate-complist:71> [[ full == brief ]]
  +-ftb-generate-complist:36> k=notes
  +-ftb-generate-complist:36> _v=< > realdir  args -Q-s-W-Mr:|/=* r:|=*-p-f word notes
  +-ftb-generate-complist:37> local -A v=( '<' '>' realdir '' args $'-Q\C-A-s\C-A\C-A-W\C-A\C-A-M\C-Ar:|/=* r:|=*\C-A-p\C-A\C-A-f' word notes )
  +-ftb-generate-complist:38> [[ notes == go ]]
  +-ftb-generate-complist:38> same_word=0
  +-ftb-generate-complist:41> dsuf='' dpre=''
  +-ftb-generate-complist:42> ((  1  ))
  +-ftb-generate-complist:43> filepath=notes
  +-ftb-generate-complist:44> [[ -d notes ]]
  +-ftb-generate-complist:45> dsuf=/
  +-ftb-generate-complist:49> ((  0  ))
  +-ftb-generate-complist:52> [[ -L notes ]]
  +-ftb-generate-complist:55> [[ on == off ]]
  +-ftb-generate-complist:61> ((  0  ))
  +-ftb-generate-complist:67> tcandidates+=$'\C-[[37m\C-@notes\C-@/'
  +-ftb-generate-complist:71> [[ full == brief ]]
  +-ftb-generate-complist:36> k=src
  +-ftb-generate-complist:36> _v=< > realdir  args -Q-s-W-Mr:|/=* r:|=*-p-f word src
  +-ftb-generate-complist:37> local -A v=( '<' '>' realdir '' args $'-Q\C-A-s\C-A\C-A-W\C-A\C-A-M\C-Ar:|/=* r:|=*\C-A-p\C-A\C-A-f' word src )
  +-ftb-generate-complist:38> [[ src == go ]]
  +-ftb-generate-complist:38> same_word=0
  +-ftb-generate-complist:41> dsuf='' dpre=''
  +-ftb-generate-complist:42> ((  1  ))
  +-ftb-generate-complist:43> filepath=src
  +-ftb-generate-complist:44> [[ -d src ]]
  +-ftb-generate-complist:45> dsuf=/
  +-ftb-generate-complist:49> ((  0  ))
  +-ftb-generate-complist:52> [[ -L src ]]
  +-ftb-generate-complist:55> [[ on == off ]]
  +-ftb-generate-complist:61> ((  0  ))
  +-ftb-generate-complist:67> tcandidates+=$'\C-[[37m\C-@src\C-@/'
  +-ftb-generate-complist:71> [[ full == brief ]]
  +-ftb-generate-complist:81> ((  same_word  ))
  +-ftb-generate-complist:84> zstyle -T :completion:complete:cd: sort
  +-ftb-generate-complist:85> ((  0 != 1  ))
  +-ftb-generate-complist:86> ((  colorful  ))
  +-ftb-generate-complist:97> tcandidates=( $'\C-[[37m\C-@go\C-@/' $'\C-[[37m\C-@nc-devbox\C-@/' $'\C-[[37m\C-@notes\C-@/' $'\C-[[37m\C-@src\C-@/' )
  +-ftb-generate-complist:100> typeset -gUa _ftb_complist=( $'\C-[[37m\C-@go\C-@/' $'\C-[[37m\C-@nc-devbox\C-@/' $'\C-[[37m\C-@notes\C-@/' $'\C-[[37m\C-@src\C-@/' )
  +-ftb-generate-complist:103> ((  0  ))
 +-ftb-complete:16> -ftb-zstyle -s continuous-trigger continuous_trigger
  +-ftb-zstyle:1> zstyle -s :fzf-tab:complete:cd: continuous-trigger continuous_trigger
 +-ftb-complete:17> [[ linux-gnu == msys ]]
 +-ftb-complete:17> continuous_trigger=/
 +-ftb-complete:20> case 4 (0)
 +-ftb-complete:20> case 4 (1)
 +-ftb-complete:20> case 4 (*)
 +-ftb-complete:29> -ftb-generate-query
  +-ftb-generate-query:3> zmodload -s zsh/pcre
  +-ftb-generate-query:4> setopt localoptions rematch_pcre
  +-ftb-generate-query:7> local key qtype tmp query_string
  +-ftb-generate-query:8> typeset -g _ftb_query=''
  +-ftb-generate-query:9> -ftb-zstyle -a query-string query_string
   +-ftb-zstyle:1> zstyle -a :fzf-tab:complete:cd: query-string query_string
  +-ftb-generate-query:9> query_string=( prefix input first )
  +-ftb-generate-query:10> qtype=prefix
  +-ftb-generate-query:11> [[ prefix == prefix ]]
  +-ftb-generate-query:13> local -a keys=( go nc-devbox notes src )
  +-ftb-generate-query:14> tmp=go
  +-ftb-generate-query:15> local MATCH match mbegin mend prefix=( g o )
  +-ftb-generate-query:16> key=nc-devbox
  +-ftb-generate-query:17> ((  2  ))
  +-ftb-generate-query:18> [[ nc-devbox == go* ]]
  +-ftb-generate-query:21> [[ ${(j::)${${(s::)key[1,$#tmp]}:^prefix}} -pcre-match '^(((.)\3)*)' ]]
  +-ftb-generate-query:23> tmp[$#MATCH/2+1,-1]=''
  +-ftb-generate-query:24> prefix[$#MATCH/2+1,-1]=( )
  +-ftb-generate-query:16> key=notes
  +-ftb-generate-query:17> ((  0  ))
  +-ftb-generate-query:17> break
  +-ftb-generate-query:35> ((  0  ))
  +-ftb-generate-query:37> [[ -n '' ]]
  +-ftb-generate-query:10> qtype=input
  +-ftb-generate-query:11> [[ input == prefix ]]
  +-ftb-generate-query:26> [[ input == input ]]
  +-ftb-generate-query:27> local fv=$'<\C-@>\C-@realdir\C-@\C-@args\C-@-Q\C-A-s\C-A\C-A-W\C-A\C-A-M\C-Ar:|/=* r:|=*\C-A-p\C-A\C-A-f\C-@word\C-@go'
  +-ftb-generate-query:28> local -A v=( '<' '>' realdir '' args $'-Q\C-A-s\C-A\C-A-W\C-A\C-A-M\C-Ar:|/=* r:|=*\C-A-p\C-A\C-A-f' word go )
  +-ftb-generate-query:29> tmp=''
  +-ftb-generate-query:30> ((  0 != 1  ))
  +-ftb-generate-query:31> tmp=''
  +-ftb-generate-query:33> tmp=''
  +-ftb-generate-query:35> ((  0  ))
  +-ftb-generate-query:37> [[ -n '' ]]
  +-ftb-generate-query:10> qtype=first
  +-ftb-generate-query:11> [[ first == prefix ]]
  +-ftb-generate-query:26> [[ first == input ]]
  +-ftb-generate-query:35> ((  0  ))
  +-ftb-generate-query:37> [[ -n '' ]]
 +-ftb-complete:30> -ftb-generate-header
  +-ftb-generate-header:3> typeset -ga _ftb_headers=( )
  +-ftb-generate-header:4> local i tmp group_colors
  +-ftb-generate-header:5> local -i mlen=0 len=0
  +-ftb-generate-header:7> ((  0 == 1  ))
  +-ftb-generate-header:15> mlen+=1
  +-ftb-generate-header:17> -ftb-zstyle -a group-colors group_colors
   +-ftb-zstyle:1> zstyle -a :fzf-tab:complete:cd: group-colors group_colors
  +-ftb-generate-header:17> group_colors=( $'\C-[[94m' $'\C-[[32m' $'\C-[[33m' $'\C-[[35m' $'\C-[[31m' $'\C-[[38;5;27m' $'\C-[[36m' $'\C-[[38;5;100m' $'\C-[[38;5;98m' $'\C-[[91m' $'\C-[[38;5;80m' $'\C-[[92m' $'\C-[[38;5;214m' $'\C-[[38;5;165m' $'\C-[[38;5;124m' $'\C-[[38;5;120m' )
  +-ftb-generate-header:19> i=1
  +-ftb-generate-header:19> i<=0
  +-ftb-generate-header:35> ((  0  ))
 +-ftb-complete:31> -ftb-zstyle -s print-query print_query
  +-ftb-zstyle:1> zstyle -s :fzf-tab:complete:cd: print-query print_query
 +-ftb-complete:31> print_query=alt-enter
 +-ftb-complete:32> -ftb-zstyle -s accept-line accept_line
  +-ftb-zstyle:1> zstyle -s :fzf-tab:complete:cd: accept-line accept_line
 +-ftb-complete:34> choices= +-ftb-complete:34> choices= +-ftb-complete:34> -ftb-fzf
 +-ftb-complete:34> print -rl -- $'\C-[[37m\C-@go\C-@/' $'\C-[[37m\C-@nc-devbox\C-@/' $'\C-[[37m\C-@notes\C-@/' $'\C-[[37m\C-@src\C-@/'
  +-ftb-fzf:4> autoload -Uz zmathfunc
  +-ftb-fzf:5> zmathfunc
   +zmathfunc:12> functions -M min 1 -1 zsh_math_func_min
   +zmathfunc:23> functions -M max 1 -1 zsh_math_func_max
   +zmathfunc:33> functions -M sum 0 -1 zsh_math_func_sum
  +-ftb-fzf:7> local tmp_dir=/tmp/zsh-fzf-tab-azureuser
  +-ftb-fzf:8> [[ -d /tmp/zsh-fzf-tab-azureuser ]]
  +-ftb-fzf:10> typeset -p words
  +-ftb-fzf:10> local ftb_preview_init=$'\nzmodload zsh/mapfile\nlocal -a _ftb_compcap=("${(@f)mapfile[/tmp/zsh-fzf-tab-azureuser/compcap.33673]}")\nlocal -a _ftb_groups=("${(@f)mapfile[/tmp/zsh-fzf-tab-azureuser/groups.33673]}")\nlocal bs=$\'\\2\'\n# get description\nexport desc=${${"$(<{f})"%$\'\\0\'*}#*$\'\\0\'}\n# get ctxt for current completion\nlocal -A ctxt=("${(@0)${_ftb_compcap[(r)${(b)desc}$bs*]#*$bs}}")\n# get group\nif (( $+ctxt[group] )); then\n  export group=$_ftb_groups[$ctxt[group]]\nfi\n# get original word\nexport word=${(Q)ctxt[word]}\n# get real path if it is file\nif (( $+ctxt[realdir] )); then\n  export realpath=${ctxt[realdir]}$word\nfi\ntypeset -g -a words=( cd \'\' )\n'
  +-ftb-fzf:31> local binds=tab:down,btab:up,change:top,ctrl-space:toggle,bspace:backward-delete-char/eof,ctrl-h:backward-delete-char/eof
  +-ftb-fzf:32> local fzf_command fzf_flags fzf_preview debug_command tmp switch_group fzf_pad fzf_min_height
  +-ftb-fzf:33> local ret=0
  +-ftb-fzf:35> -ftb-zstyle -s fzf-command fzf_command
   +-ftb-zstyle:1> zstyle -s :fzf-tab:complete:cd: fzf-command fzf_command
  +-ftb-fzf:36> -ftb-zstyle -a fzf-bindings tmp
   +-ftb-zstyle:1> zstyle -a :fzf-tab:complete:cd: fzf-bindings tmp
  +-ftb-fzf:37> -ftb-zstyle -a fzf-flags fzf_flags
   +-ftb-zstyle:1> zstyle -a :fzf-tab:complete:cd: fzf-flags fzf_flags
  +-ftb-fzf:38> -ftb-zstyle -s fzf-preview fzf_preview
   +-ftb-zstyle:1> zstyle -s :fzf-tab:complete:cd: fzf-preview fzf_preview
  +-ftb-fzf:39> -ftb-zstyle -a switch-group switch_group
   +-ftb-zstyle:1> zstyle -a :fzf-tab:complete:cd: switch-group switch_group
  +-ftb-fzf:39> switch_group=( F1 F2 )
  +-ftb-fzf:40> -ftb-zstyle -s fzf-pad fzf_pad
   +-ftb-zstyle:1> zstyle -s :fzf-tab:complete:cd: fzf-pad fzf_pad
  +-ftb-fzf:40> fzf_pad=2
  +-ftb-fzf:41> -ftb-zstyle -s fzf-min-height fzf_min_height
   +-ftb-zstyle:1> zstyle -s :fzf-tab:complete:cd: fzf-min-height fzf_min_height
  +-ftb-fzf:41> fzf_min_height=0
  +-ftb-fzf:43> -ftb-zstyle -a debug-command debug_command
   +-ftb-zstyle:1> zstyle -a :fzf-tab:complete:cd: debug-command debug_command
  +-ftb-fzf:48> print -rl -- $'go\C-B<\C-@>\C-@realdir\C-@\C-@args\C-@-Q\C-A-s\C-A\C-A-W\C-A\C-A-M\C-Ar:|/=* r:|=*\C-A-p\C-A\C-A-f\C-@word\C-@go' $'nc-devbox\C-B<\C-@>\C-@realdir\C-@\C-@args\C-@-Q\C-A-s\C-A\C-A-W\C-A\C-A-M\C-Ar:|/=* r:|=*\C-A-p\C-A\C-A-f\C-@word\C-@nc-devbox' $'notes\C-B<\C-@>\C-@realdir\C-@\C-@args\C-@-Q\C-A-s\C-A\C-A-W\C-A\C-A-M\C-Ar:|/=* r:|=*\C-A-p\C-A\C-A-f\C-@word\C-@notes' $'src\C-B<\C-@>\C-@realdir\C-@\C-@args\C-@-Q\C-A-s\C-A\C-A-W\C-A\C-A-M\C-Ar:|/=* r:|=*\C-A-p\C-A\C-A-f\C-@word\C-@src'
  +-ftb-fzf:49> print -rl --
  +-ftb-fzf:50> print -r -- $'\nzmodload zsh/mapfile\nlocal -a _ftb_compcap=("${(@f)mapfile[/tmp/zsh-fzf-tab-azureuser/compcap.33673]}")\nlocal -a _ftb_groups=("${(@f)mapfile[/tmp/zsh-fzf-tab-azureuser/groups.33673]}")\nlocal bs=$\'\\2\'\n# get description\nexport desc=${${"$(<$1)"%$\'\\0\'*}#*$\'\\0\'}\n# get ctxt for current completion\nlocal -A ctxt=("${(@0)${_ftb_compcap[(r)${(b)desc}$bs*]#*$bs}}")\n# get group\nif (( $+ctxt[group] )); then\n  export group=$_ftb_groups[$ctxt[group]]\nfi\n# get original word\nexport word=${(Q)ctxt[word]}\n# get real path if it is file\nif (( $+ctxt[realdir] )); then\n  export realpath=${ctxt[realdir]}$word\nfi\ntypeset -g -a words=( cd \'\' )\n'
  +-ftb-fzf:52> binds=tab:down,btab:up,change:top,ctrl-space:toggle,bspace:backward-delete-char/eof,ctrl-h:backward-delete-char/eof
  +-ftb-fzf:54> local -i header_lines=0
  +-ftb-fzf:55> local -i lines=6
  +-ftb-fzf:56> local reload_command='/usr/bin/zsh -f /home/azureuser/.dotfiles/links/zsh/fzf/lib/ftb-switch-group 33673 0 /tmp/zsh-fzf-tab-azureuser'
  +-ftb-fzf:59> local use_tmux_popup=0
  +-ftb-fzf:60> [[ ftb-tmux-popup == ftb-tmux-popup ]]
  +-ftb-fzf:61> use_tmux_popup=1
  +-ftb-fzf:64> ((  ! use_tmux_popup  ))
  +-ftb-fzf:71> cat
  +-ftb-fzf:73> local dd=gdd
  +-ftb-fzf:74> ((  0 == 0  ))
  +-ftb-fzf:75> dd=dd
  +-ftb-fzf:77> ((  1 == 0  ))
  +-ftb-fzf:81> _ftb_query=  +-ftb-fzf:81> dd 'bs=1G' 'count=1' 'status=none' 'iflag=nonblock'
  +-ftb-fzf:81> _ftb_query=''
  +-ftb-fzf:81> true
   +zsh_math_func_max:1> local result=6
   +zsh_math_func_max:2> shift
   +zsh_math_func_max:3> local arg
   +zsh_math_func_max:4> arg=0
   +zsh_math_func_max:5> ((  0 > result  ))
   +zsh_math_func_max:7> ((  result  ))
   +zsh_math_func_min:1> local result=6
   +zsh_math_func_min:2> shift
   +zsh_math_func_min:3> local arg
   +zsh_math_func_min:4> arg=24
   +zsh_math_func_min:5> ((  24 < result  ))
   +zsh_math_func_min:7> ((  result  ))
  +-ftb-fzf:83> SHELL=zsh   +-ftb-fzf:83> ftb-tmux-popup --ansi '--bind=tab:down,btab:up,change:top,ctrl-space:toggle,bspace:backward-delete-char/eof,ctrl-h:backward-delete-char/eof' '--bind=F1:reload(/usr/bin/zsh -f /home/azureuser/.dotfiles/links/zsh/fzf/lib/ftb-switch-group 33673 0 /tmp/zsh-fzf-tab-azureuser -1),F2:reload(/usr/bin/zsh -f /home/azureuser/.dotfiles/links/zsh/fzf/lib/ftb-switch-group 33673 0 /tmp/zsh-fzf-tab-azureuser 1)' '--color=hl:188' --cycle '--delimiter=\x00' '--expect=/,alt-enter,' '--header-lines=0' '--height=6' '--layout=reverse' --multi '--nth=2,3' --print-query '--query=' '--tiebreak=begin'
   +ftb-tmux-popup:8> emulate -L zsh -o extended_glob
   +ftb-tmux-popup:11> ((  ! 1  ))
   +ftb-tmux-popup:16> : /tmp/zsh-fzf-tab-azureuser
   +ftb-tmux-popup:19> ((  ! 1  ))
   +ftb-tmux-popup:24> local ret=0
   +ftb-tmux-popup:26> local -a fzf_opts=( --ansi '--bind=tab:down,btab:up,change:top,ctrl-space:toggle,bspace:backward-delete-char/eof,ctrl-h:backward-delete-char/eof' '--bind=F1:reload(/usr/bin/zsh -f /home/azureuser/.dotfiles/links/zsh/fzf/lib/ftb-switch-group 33673 0 /tmp/zsh-fzf-tab-azureuser -1),F2:reload(/usr/bin/zsh -f /home/azureuser/.dotfiles/links/zsh/fzf/lib/ftb-switch-group 33673 0 /tmp/zsh-fzf-tab-azureuser 1)' '--color=hl:188' --cycle '--delimiter=\x00' '--expect=/,alt-enter,' '--header-lines=0' '--height=6' '--layout=reverse' --multi '--nth=2,3' --print-query '--query=' '--tiebreak=begin' )
   +ftb-tmux-popup:27> fzf_opts=( --ansi '--bind=tab:down,btab:up,change:top,ctrl-space:toggle,bspace:backward-delete-char/eof,ctrl-h:backward-delete-char/eof' '--bind=F1:reload(/usr/bin/zsh -f /home/azureuser/.dotfiles/links/zsh/fzf/lib/ftb-switch-group 33673 0 /tmp/zsh-fzf-tab-azureuser -1),F2:reload(/usr/bin/zsh -f /home/azureuser/.dotfiles/links/zsh/fzf/lib/ftb-switch-group 33673 0 /tmp/zsh-fzf-tab-azureuser 1)' '--color=hl:188' --cycle '--delimiter=\x00' '--expect=/,alt-enter,' '--header-lines=0' --multi '--nth=2,3' --print-query '--query=' '--tiebreak=begin' )
   +ftb-tmux-popup:30> tmux display-message -p '#{pane_top} #{cursor_y} #{pane_left} #{cursor_x} #{window_height} #{window_width} #{status} #{status-position}'
   +ftb-tmux-popup:30> local -a tmp=( 39 0 159 24 76 316 on bottom )
   +ftb-tmux-popup:31> local cursor_y=39 cursor_x=183 window_height=76 window_width=316 window_top=0
   +ftb-tmux-popup:33> [[ bottom == top ]]
   +ftb-tmux-popup:39> ((  ! 1  ))
   +ftb-tmux-popup:44> local text REPLY comp_lines comp_length length popup_pad popup_min_size
   +ftb-tmux-popup:46> zstyle -a :fzf-tab:complete:cd: popup-pad popup_pad
   +ftb-tmux-popup:47> zstyle -a :fzf-tab:complete:cd: popup-min-size popup_min_size
   +ftb-tmux-popup:47> popup_min_size=( 0 0 )
   +ftb-tmux-popup:50> comp_lines=4
   +ftb-tmux-popup:51> ((  comp_lines <= 500  ))
   +ftb-tmux-popup:52> comp_length=0
   +ftb-tmux-popup:53> line= go /
   +ftb-tmux-popup:54> length=5
   +ftb-tmux-popup:55> ((  length >= comp_length  ))
   +ftb-tmux-popup:55> comp_length=5
   +ftb-tmux-popup:53> line= nc-devbox /
   +ftb-tmux-popup:54> length=12
   +ftb-tmux-popup:55> ((  length >= comp_length  ))
   +ftb-tmux-popup:55> comp_length=12
   +ftb-tmux-popup:53> line= notes /
   +ftb-tmux-popup:54> length=8
   +ftb-tmux-popup:55> ((  length >= comp_length  ))
   +ftb-tmux-popup:53> line= src /
   +ftb-tmux-popup:54> length=6
   +ftb-tmux-popup:55> ((  length >= comp_length  ))
   +ftb-tmux-popup:61> comp_length=92
   +ftb-tmux-popup:63> local popup_height popup_y popup_width popup_x adjust_height
   +ftb-tmux-popup:66> ((  0 > 0  ))
   +ftb-tmux-popup:71> ((  cursor_y * 2 > window_height  ))
   +ftb-tmux-popup:73> popup_height=    +zsh_math_func_max:1> local result=8
    +zsh_math_func_max:2> shift
    +zsh_math_func_max:3> local arg
    +zsh_math_func_max:4> arg=0
    +zsh_math_func_max:5> ((  0 > result  ))
    +zsh_math_func_max:7> ((  result  ))
    +zsh_math_func_min:1> local result=8
    +zsh_math_func_min:2> shift
    +zsh_math_func_min:3> local arg
    +zsh_math_func_min:4> arg=39
    +zsh_math_func_min:5> ((  39 < result  ))
    +zsh_math_func_min:7> ((  result  ))
8
   +ftb-tmux-popup:74> popup_y=39
   +ftb-tmux-popup:75> zstyle -T :fzf-tab:complete:cd: popup-smart-tab
   +ftb-tmux-popup:76> fzf_opts+=( '--bind=tab:up,btab:down' )
   +ftb-tmux-popup:86> popup_width=    +zsh_math_func_max:1> local result=97
    +zsh_math_func_max:2> shift
    +zsh_math_func_max:3> local arg
    +zsh_math_func_max:4> arg=0
    +zsh_math_func_max:5> ((  0 > result  ))
    +zsh_math_func_max:7> ((  result  ))
    +zsh_math_func_min:1> local result=97
    +zsh_math_func_min:2> shift
    +zsh_math_func_min:3> local arg
    +zsh_math_func_min:4> arg=316
    +zsh_math_func_min:5> ((  316 < result  ))
    +zsh_math_func_min:7> ((  result  ))
97
   +ftb-tmux-popup:87> popup_x=183
   +ftb-tmux-popup:89> echo -E 'env SHELL=zsh /home/azureuser/.fzf/bin/fzf '\''--ansi'\' \''--bind=tab:down,btab:up,change:top,ctrl-space:toggle,bspace:backward-delete-char/eof,ctrl-h:backward-delete-char/eof'\' \''--bind=F1:reload(/usr/bin/zsh -f /home/azureuser/.dotfiles/links/zsh/fzf/lib/ftb-switch-group 33673 0 /tmp/zsh-fzf-tab-azureuser -1),F2:reload(/usr/bin/zsh -f /home/azureuser/.dotfiles/links/zsh/fzf/lib/ftb-switch-group 33673 0 /tmp/zsh-fzf-tab-azureuser 1)'\' \''--color=hl:188'\' \''--cycle'\' \''--delimiter=\x00'\' \''--expect=/,alt-enter,'\' \''--header-lines=0'\' \''--multi'\' \''--nth=2,3'\' \''--print-query'\' \''--query='\' \''--tiebreak=begin'\' \''--bind=tab:up,btab:down'\'' < /tmp/zsh-fzf-tab-azureuser/completions.33673 > /tmp/zsh-fzf-tab-azureuser/result-33673'
   +ftb-tmux-popup:91> tmux popup -x 183 -y 39 -w 97 -h 8 -d /home/azureuser -E '. /tmp/zsh-fzf-tab-azureuser/fzf-33673'
   +ftb-tmux-popup:93> ret=130
   +ftb-tmux-popup:94> echo -E ''
   +ftb-tmux-popup:96> rm /tmp/zsh-fzf-tab-azureuser/fzf-33673 /tmp/zsh-fzf-tab-azureuser/result-33673
   +ftb-tmux-popup:97> ((  1  ))
   +ftb-tmux-popup:99> return 130
  +-ftb-fzf:100> ret=130
  +-ftb-fzf:102> ((  ! use_tmux_popup  ))
  +-ftb-fzf:107> rm /tmp/zsh-fzf-tab-azureuser/compcap.33673 /tmp/zsh-fzf-tab-azureuser/completions.33673 /tmp/zsh-fzf-tab-azureuser/ftb_preview_init.33673 /tmp/zsh-fzf-tab-azureuser/groups.33673
  +-ftb-fzf:108> return 130
 +-ftb-complete:34> choices=( '' )
 +-ftb-complete:35> ret=130
 +-ftb-complete:39> [[ '' == alt-enter ]]
 +-ftb-complete:39> [[ -n '' ]]
 +-ftb-complete:55> choices[1]=( )
 +-ftb-complete:57> choices=( )
 +-ftb-complete:59> unset CTXT
 +-ftb-complete:63> [[ -n '' ]]
 +-ftb-complete:68> [[ -n '' ]]
 +-ftb-complete:71> choices[1]=( )
 +-ftb-complete:81> compstate[list]=''
 +-ftb-complete:82> compstate[insert]=''
 +-ftb-complete:83> ((  0 == 1  ))
 +-ftb-complete:86> ((  0 > 1  ))
 +-ftb-complete:89> return 130
+fzf-tab-debug:11> unsetopt xtrace
ian-howell commented 9 months ago

I've found that removing these 3 lines fixes the issue. I'd make a PR, but I honestly have no idea how any of this stuff works, so I imagine there's a reason for these lines:

https://github.com/Aloxaf/fzf-tab/blob/1133a883b6a2fa1455d7439563b8127ae8b2a037/lib/ftb-tmux-popup#L75-L77

Aloxaf commented 9 months ago

Your fzf ui is not displaying correctly. When the tmux popup is shown above the cursor, the fzf prompt should be at the bottom, then 'tab' behavior conforms to expectations. But in your screenshot, the fzf prompt is always at the top.

Have you ever set FZF_DEFAULT_OPTS anywhere?

ian-howell commented 9 months ago

Thanks for the quick response.

Yes, you're probably right. I'd forgotten that even though I was testing with the minimal zshrc, the FZF_DEFAULT_OPTS is exported, so it was getting passed to the child zsh shells.

I have this in my .zshrc:

export FZF_DEFAULT_OPTS="--height 40% --layout=reverse"

I will toy with it some more when I'm next at my keyboard. I'm going to leave this bug open until then (unless you're confident enough to close it).

ian-howell commented 9 months ago

Unfortunately, it doesn't seem like that was it. I unset FZF_DEFAULT_OPTS and still saw the undesirable behavior. I tried a handful of different settings, as well as returning all of fzf's variables to default.

For what it's worth, I can't replicate this behavior using just fzf (nor it's ctrl-t or alt-c). The issue only occurs when I hit the TAB key and start fzf-tab.

Aloxaf commented 9 months ago

Very strange.

Can you replicate this behavior with tmux popup -E 'seq 10 | fzf'?

And how about change this line to fzf_opts+=(--bind=tab:up,btab:down --layout=default) and try again?

https://github.com/Aloxaf/fzf-tab/blob/a975fce2af760db9f5f82ab713ae832621205dfa/lib/ftb-tmux-popup#L76

ian-howell commented 9 months ago

I tried out tmux popup -E 'seq 10 | fzf', but it doesn't look like the TAB key works there by default...

However I do have some success with fzf_opts+=(--bind=tab:up,btab:down --layout=default. The popup still appears above the cursor, the first selection is at the bottom of the list, and TAB causes the cursor to move up the list:

fzf-tab-solution

This is much better, I would be ok with calling this an acceptable fix.

The behavior when I'm in the top tmux pane is the same as before (which is desired).