Comments (21)
You can set sort
tag to false to let fzf-tab respect to the original order.
zstyle ':completion:complete:ls:argument-rest' sort false
from fzf-tab.
Thanks. Because the fzf
command is given the argument --layout=reverse
, the file-sort
completion needs to be reversed to get the right order:
zstyle ':completion:*' file-sort access reverse
zstyle ':completion:complete:*:argument-rest' sort false
The fzf
argument --no-sort
seems to be unnecessary.
Edit: Reversing the file-sort
is no longer necessary.
from fzf-tab.
Could you explain in more detail how to implement this?
function toggle-fzf-tab-sort() {
if (( _no_sort_fzf_tab )); then
zstyle ':fzf-tab:*' extra-opts '--sort'
zstyle ':completion:*' sort 'true'
unset _no_sort_fzf_tab
else
zstyle ':fzf-tab:*' extra-opts '--no-sort'
zstyle ':completion:*' sort 'false'
_no_sort_fzf_tab=1
fi
}
zle -N toggle-fzf-tab-sort
bindkey '^T' toggle-fzf-tab-sort
from fzf-tab.
You can also add --tac
to extra-opts
to reverse the list.
from fzf-tab.
As I understand it, you went the way statically calling the plugin sort or nosort? Option switch did not implement? Bad, I'll use my fork!
from fzf-tab.
As I understand it, you went the way statically calling the plugin sort or nosort?
No. See #58 (comment).
from fzf-tab.
As I understand it, you went the way statically calling the plugin sort or nosort?
No. See #58 (comment).
And how it will help me to change sorting on the fly? What I showed in the screenshots.
from fzf-tab.
And how it will help me to change sorting on the fly? What I showed in the screenshots.
Wish I knew what you mean. Fortunately you have your fork.
from fzf-tab.
Wish I knew what you mean. Fortunately you have your fork.
Toggle plugin from sort to nosort when you type something either. My rejected PR 😉
from fzf-tab.
@webmastak #58 (comment) appears to do what you are asking for. If not, you can always use your fork.
from fzf-tab.
@webmastak #58 (comment) appears to do what you are asking for. If not, you can always use your fork.
Could you explain in more detail how to implement this?
from fzf-tab.
Thanks, I'll try.
from fzf-tab.
After comparing the version of the plugin which is in my fork and the current one. I noticed that when sorting is disabled, the results are different and the plugin in my fork shows better.
Can I fix it somehow?
from fzf-tab.
@webmastak Your fork has diverged too much. It's a lot of work go through all the changes, guess what config you are using, just to answer your question. If you ask better questions, you'll get better answers.
from fzf-tab.
Your fork has diverged too much.
The fact is that no matter how the code under the hood changes, the output to the user should be the same in all versions!
Which block of code in the plugin is responsible for sorting the results?
from fzf-tab.
@webmastak It's a bug. I introduced GNU sort in d7ed42b and it seems always doesn't work as I expect...
I give it a simple fix in f0627fe, before I find the right way to use GNU sort.
from fzf-tab.
Thanks a lot. Your plugin is the best. 👍
from fzf-tab.
I'd like to get the list sorted this way, but I'm not seeing an effect after adding the suggested config. Might I be misunderstanding what is required or the order? I have tried commenting my own completions.zsh and even the junegunn/fzf parts, but files are still being ordered alphabetically.
from fzf-tab.
@mxmilkiib You should also specify the file sort: zstyle ':completion:*' file-sort access
And make sure you're using ls
not something like exa
.
from fzf-tab.
Thanks, whoopy, I realise I somehow broke that link, the file-sort access
bit was on 191.
I was looking for file-sort modification
anyway.
Without fzf-tab, and with file-sort modification
I get;
Without fzf-tab, and with file-sort access
;
With fzf-tab, and with either of the sort, I get;
from fzf-tab.
zstyle ':completion:complete:ls:argument-rest' sort false
only disable sorting for ls
. You should use zstyle ':completion:complete:*:argument-rest' sort false
if you want to disable it for every commands.
from fzf-tab.
Related Issues (20)
- [BUG] fzf-bindings 'tab:accept' stops working after changing directories and going back HOT 1
- [BUG] Completion failing on Ubuntu 20.04 (fzf version <= 0.20.0) HOT 3
- [BUG] bat preview shows only some lines of a file
- [BUG] Void Linux: command not found: _complete HOT 1
- [FR] add aliased command to `$desc`
- [BUG] fzf-tab gives a weird error HOT 2
- Trouble getting fzf-tab to work without nvm [BUG] HOT 1
- [BUG] zsh: command not found: enable-fzf-tab HOT 1
- [FR] Allow to disable default bindings HOT 2
- [FR]
- [Q] Can tab complete to the longest common prefix, then open fzf? HOT 1
- [Q] can not use regex character, such as $ and . HOT 2
- [Q] Why does sourcing fzf-tab.zsh from a script cause syntax errors? HOT 1
- [Q] Some programs cannot be completed, how to solve it? HOT 1
- kitty +kitten icat works with FZF but does not work with fzf-preview [BUG] HOT 2
- [Q] Is there a quick way to tell whether build-fzf-tab-module has already been run? HOT 1
- Weird bash error in fzf-preview: "/bin/bash: line 2: zmodload: command not found" HOT 2
- [BUG] Fzf-tab not working for oh-my-zsh `aws` plugin when running commands like `asp`, `acp` HOT 1
- [FR] Could fzf-tab builds the binary without zsh source code like past? HOT 1
- [BUG] TAB key presses are reversed in specific scenarios when using `ftb-tmux-popup` HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fzf-tab.