fp (FilterPath) is the filter equivalent for the Unix test util.
$ ls
file-foo dir-read-write dir-read-only
# list files in the current directory, and filter for writable directories
$ ls | fp -dw
dir-read-writeFor help, run fp with -? or --help.
The accepted filter flags are the same ones used by Unix test.
See POSIX documentation
or man test.