Git Product home page Git Product logo

Comments (9)

sayanarijit avatar sayanarijit commented on May 26, 2024

Seems to be random. Sometimes works fine.

from xplr.

sayanarijit avatar sayanarijit commented on May 26, 2024

Refresh doesn't work though.

from xplr.

sayanarijit avatar sayanarijit commented on May 26, 2024

But the actual command would be...

xplr --on-load 'AddNodeFilter: { filter: RelativePathDoesMatchRegex, input: "\\.png$" }' --on-load 'ExplorePwd'

Still doesn't exactly do what it does when the filter is applied interactively.

from xplr.

dtomvan avatar dtomvan commented on May 26, 2024

But the actual command would be...

xplr --on-load 'AddNodeFilter: { filter: RelativePathDoesMatchRegex, input: "\\.png$" }' --on-load 'ExplorePwd'

Hmm, it worked with fr.*\.png$<enter><esc> so I don't see why it would make any difference, it is shorter though.

explorer::explore_sync is called when doing ExplorePwd. I would guess the redraw is inconsistent, as filters are being applied in that function. Doing both ExplorePwd and Refresh should fix it. If not, the --on-load arguments may not be executed in order.

from xplr.

dtomvan avatar dtomvan commented on May 26, 2024

Same thing applies with:

echo 'AddNodeFilter: { filter: RelativePathDoesMatchRegex, input: "\\.png$" }' >> $XPLR_PIPE_MSG_IN

from inside xplr. This seemingly applies the filter, but it leaves the user with no directory nodes, as the faulty filter seems to not match anything. Clearing the filter afterwards and using the TUI to apply it manually seems to "fix" the filter, even tho the string representation "rel=/\.png$" is the same in all 3 cases.

from xplr.

sayanarijit avatar sayanarijit commented on May 26, 2024

This seem to happen with only regex. Other filters are working fine.

xplr --on-load 'AddNodeFilter: { filter: RelativePathDoesEndWith, input: ".png" }' ExplorePwd

from xplr.

sayanarijit avatar sayanarijit commented on May 26, 2024

Ah... got it. Bug due to optimization using cache.

from xplr.

sayanarijit avatar sayanarijit commented on May 26, 2024

It seems there's still some task scheduling issue. Running the following command in my homedir doesn't apply the filters. Looks like ExplorePwd happens before the filter is added.

xplr --on-load 'AddNodeFilter: { filter: RelativePathDoesEndWith, input: foo }' ExplorePwd

from xplr.

sayanarijit avatar sayanarijit commented on May 26, 2024

I think it's because the explore_pwd_async() that sets the parent directory locations, also overrides the results for the pwd.

from xplr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.