lf icon indicating copy to clipboard operation
lf copied to clipboard

Filter tagged files -- more generally: filter by something other than name

Open rolfmorel opened this issue 2 years ago • 0 comments

I have the following use case that works well in ranger but cannot seem to get working in lf.

I have a directory of files/dirs that need processing. I keep track of which of these files still need processing by using tags: a tag means "still needs to be processed." When I am done processing a file, I remove its tag. When making the selection for the next file to process I want to see just those files that still require processing. With how I am using tags, this means I want to filter the tagged files in the directory.

Hence my query: Is it possible to filter just the tagged files in a directory with lf?

I already had a look at the commands, like "filter" and "glob-select". I believe these only work on file names (though do support one special operator "negation").

My prefered approach would be to allow an external command to select an arbitrary filtering of the current directory. For my use case, this external command would need to be supplied with the current lf working directory and the lf tags. The latter I could also access externally by just reading .local/share/lf/tags.

rolfmorel avatar May 26 '23 19:05 rolfmorel