bemenu
bemenu copied to clipboard
bemenu-run shows non-executable files in $PATH.
Linux distribution packages install non-executable files in $PATH.
$PATH
ideally should only contain executables, that's the purpose of it. Doing additional check whether file is executable or not could potentially make bemenu-run
much slower as it would need stat
system call for every file!
dmenu-run creates a cache through dmenu_path.
Yeah, you can optionally do that yourself as well. The bemenu-run
is designed to read PATH as is and rely on linux's filesystem cache. So it's usually fast without any own caching.
For now, I pipe the output of dmenu_path to bemenu.
I could perhaps also introduce option for bemenu-run that filters the PATH.
What about caching?
If you want external cache, then using something like dmenu_path or rolling your own is recommended as it's also simpler than implementing it in bemenu-run, doing that you could even supply bemenu the shell's own cache. bemenu-run is simple program that only relies on the filesystem cache, doesn't write anything to the disk nor doesn't have to worry when to invalidate the cache.
Is bemenu-run going to be reasonably fast if it checks execution permission?
That I don't know without testing. I'd assume filesystem cache also caches metadata so my guess would be yeah.
It will be fast on a hot cache but can be extremely slow when it's cold depending on the filesystem and medium