-
-
Notifications
You must be signed in to change notification settings - Fork 816
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
Add 'executable' file type #246
Comments
Note: we already have an |
@sharkdp I want to pick this up if nobody is working on that. |
@PramodBisht Sounds great! |
Some implementation to search by filetype `executables`
@sharkdp in PramodBisht@8f796e3 commit I have added changeset to show only |
These changes look good to me. How did you test this? Which OS are you on? |
@sharkdp I am using ubuntu 14.04. I executed |
I just got a closer look. There is indeed a logical error in that code. Let's take a look at these lines in if (entry_type.is_file() && !file_types.files)
|| (entry_type.is_dir() && !file_types.directories)
|| (entry_type.is_symlink() && !file_types.symlinks)
|| (output::is_executable(&entry.metadata().unwrap()) && !file_types.executables)
{
return ignore::WalkState::Continue;
} The way this works is that certain filesystem entries are skipped if one (or more) of the statements like If you specify It looks like the if (entry_type.is_file() && !file_types.files)
|| (entry_type.is_dir() && !file_types.directories)
|| (entry_type.is_symlink() && !file_types.symlinks)
|| (!output::is_executable(&entry.metadata().unwrap()) && file_types.executables_only)
{
return ignore::WalkState::Continue;
} This would also allow us to specify |
Some implementation to search by filetype `executables`
This is part of fd v7.0.0 |
Add a new
executable
/x
filetype for--type
/-t
filtering that only shows files with the executable bit.For Windows, we could either disable this feature completely or search for files with
exe
/bat
/com
/cmd
/msi
.. file extensions.The text was updated successfully, but these errors were encountered: