cosmic-files icon indicating copy to clipboard operation
cosmic-files copied to clipboard

[Feature request] Search function additions

Open hfc2x opened this issue 1 year ago • 2 comments

When searching for some configuration files, I found out that the search function is currently able to find the files I'm looking for, but it does not report where the file is. I needed to modify a configuration file with Vim, but I was never able to find it just by looking. The search function helped me find the file, but it didn't tell me where it was, even when looking at the details.

Fortunately, you can still copy the file from the search result and paste in the terminal, which will paste the full route to the file. This workaround is not very ideal, however.

I also realized it's not possible to exit "search mode" once you search for a file. If you click on a directory in the top bar to go to the previous directory, it will show you results from that directory instead of exiting. You have to either close the window/tab, or press "back" a bunch of times until "search mode" is "undone".

Having an exit button out of this mode would be very helpful.

hfc2x avatar Aug 16 '24 04:08 hfc2x

Hey @hfc2x , we just merged a way to exit search mode when you submit an empty input , might be kind of useful to you . For more see: https://github.com/pop-os/cosmic-files/pull/386

l-const avatar Aug 16 '24 11:08 l-const

I think that's definitely a step in the right direction. However, I was thinking about something that could convey being in search mode state (and exiting from it) with a little bit more clarity.

For example, instead of making the text field for file search disappear once a search has been conducted, having it remain open with the search terms would make it far clearer that we're still in search more. The "clear field" button could be then used for automatically clearing and performing an empty search, which would end search mode.

I mention this because this is how macOS does it IIRC (just mentioning it because I personally think it conveys it pretty well). But I'm completely unaware of the potential problems of modifying the search function to work similar to that.

hfc2x avatar Aug 17 '24 15:08 hfc2x