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

Use test builtin to get file type #33

Merged
merged 1 commit into from
Sep 22, 2020
Merged

Use test builtin to get file type #33

merged 1 commit into from
Sep 22, 2020

Conversation

IlanCosman
Copy link
Collaborator

@IlanCosman IlanCosman commented Sep 22, 2020

Use the test builtin repeatedly instead of ls -o -d to get file types in order to preview files. Running test, though having to do it multiple times, is much faster than running ls and also less hacky.

I have tested this by creating a named pipe with mknod named-pipe-identifier p and then spamming time _fzf_preview_file named-pipe-identifier. 200 microseconds vs. 3ms on my arch vm.

Broken out from #30

@PatrickF1 PatrickF1 changed the title Use test to get file type Use test builtin to get file type Sep 22, 2020
@PatrickF1 PatrickF1 merged commit 8206642 into PatrickF1:master Sep 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants