Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fzf --multi result order #1417

Closed
stfl opened this issue Oct 31, 2018 · 2 comments
Closed

fzf --multi result order #1417

stfl opened this issue Oct 31, 2018 · 2 comments
Labels

Comments

@stfl
Copy link

stfl commented Oct 31, 2018

I noticed that the output order when doing multi selection is the same order as selected.
I want it to be the order of the search. Especially when dealing with a git history, the order is important.

echo "1
2
3" | fzf --multi

selecting 1, then 3, then 2 yields:

1
3
2

I want this to result in

1
2
3

Is there an option for that?

@junegunn
Copy link
Owner

junegunn commented Nov 8, 2018

No, there's no such option. But you can sort the output afterwards.

git log --oneline --color=always | nl | fzf --multi --ansi --with-nth 2.. | sort -nk1

@stfl
Copy link
Author

stfl commented Nov 8, 2018

sounds good. thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants