How can I select files/folders in the current directory that match a patern, e.g. jpg extension or partial filename.
thanks
Use :select command:
select *.jpg select *part* " or select /part/ " jpg or png files that don't contain "to" substring select {*.jpg,*.png}!/to/
The patterns are like in :filetype.
:filetype
Great, thank you
I just created a folder named jpg and tested with other files123.jpg and abc.jpg- I am not able to select the folder AND the other files - only the dot files are selected. I tried the regex :select {^jpg$|*.jpg} but still not successful.
jpg
123.jpg
abc.jpg
:select {^jpg$|*.jpg}
The correct regexp is :select /^jpg$|.*\.jpg$/ or use globs as :select {jpg,*.jpg}.
:select /^jpg$|.*\.jpg$/
:select {jpg,*.jpg}
Both are working well.
Why the first one :select /^jpg$|.*\.jpg$/ doesn't accept curly bracket ?:select {/^jpg$|.*\.jpg$/}
:select {/^jpg$|.*\.jpg$/}
and why the second one :select {jpg,*.jpg} is working whithout curly bracket? :select jpg,*.jpg
:select jpg,*.jpg
thank you
Because those signify globs. Vifm needs to know how to interpret a pattern.
Because :select interprets its pattern as a glob by default.
:select
You can read about patterns in the documentation for more details.
@xaizek Thank you for this clarification