Aloxaf / fzf-tab

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

[BUG] fzf-tab don't respect numericglobsort #224

Open Freed-Wu opened 3 years ago

Freed-Wu commented 3 years ago

Describe the bug

if user setopt numericglobsort, the original completions will be sorted by number

❯ ls <Tab>
filename
1        2        3        4        5        6        7        8        9        10

however, the fzf-tab still sort by dictionary order

❯ ls <Tab>
>
  10/10 +S (0)
> 1
  10
  2
  3
  4
  5
  6
  7

maybe it is a feature? thanks!

I can make sure:

obreitwi commented 3 years ago

I seem to encounter the same error when using fzf-tab to complete cdr:

❯ cdr <tab>
>
  29/29 (0)
> 10  -- ~/xxx/xxxxxxxxxxxxxxxx/xxxxxx
  11  -- ~/xxxx/xxxxxxx
  12  -- ~/xxx/xxxxxxxxxxxxxxxx
  13  -- ~/xxx/xxxxxxx/xxxxx
  14  -- ~/xxxxxx
  15  -- /xxx/xxxxx
  16  -- ~/xxx/xxxxx/xxxxxxxxxxxx
  17  -- /xxx
  18  -- ~/xxx/xxxxx/xxx
  19  -- ~/xxx/xxxxxx/xxxxxxxxxxxxxxxxxxxxx
  1   -- ~/xxxxx
  20  -- ~/xxx/xxxx/xxxxxxxxxxxxxxxxxxxxxxx
  21  -- ~/xxx/xxxx/xxxxxxxxxxxxxxxxxxxxxxxxxx
  22  -- ~/xxxxxx/xxxx
  23  -- ~/xxxxxxxxx/xxxxxx/xxxxxxxxxxxxxxxxxxx
  24  -- ~/xxx/xxxxxxxxxxxxxxxxxxxxxxxx
  25  -- ~/xxx/xxxxxxxxxxxxxxxx/xxxxxx
  26  -- ~/xxx/xxxx/xxxxxxxxxxxxxxx/xxxxxxxxxxxxxxx
  27  -- ~/xxx/xxxxxx/xxxxxxxxxxxxxxxxxxxxx
  28  -- ~/xxxx
  29  -- ~/xxx/xxxx/xxxxx
  2   -- ~/xxxx
  3   -- ~/xxx/xxxxxxxxxxxxxxxx
  4   -- ~/xxx/xxxxxxxxxxxxxxxx/xxx
  5   -- ~/xxx/xxxxxxxxxxxxxxxxxxxxxxxx/xxxxxx
  6   -- ~/xxxxxxx
  7   -- ~/xxx/xxxxxxxxxxxxxxxxxxxxxxxx
  8   -- ~/xxxx
  9   -- ~/xxx/xxxx

Otherwise, fzf-tab has been an absolute game-changer, thank you!