Skip to content

Name filter

pls allows the user to filter the contents by regex matching on names. Name matching can be used to exclude the names that match a certain pattern or only include the names that match a certain pattern. Both can be used in tandem to perform very powerful filtering.

Arguments

--exclude/-e can be used to remove the files that match the given pattern. --only/-o can be used to remove the files that do not match the given pattern.

Examples

Terminal window
pls # or --only='.*' --exclude='$^'

​󰋩 a.jpg a.rs 󰋩 b.jpg b.rs 󰋩 c.jpeg c.rs

 
Terminal window
pls --only='(a|c)' --exclude='\.jpe?g$'

a.rs c.rs

 
Terminal window
pls --exclude='\.jpe?g$' a.jpg # `--exclude` has no effect

​󰋩 a.jpg