Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tab competition when changing root paths in file list #29

Open
damoclark opened this issue Sep 1, 2022 · 2 comments
Open

Add tab competition when changing root paths in file list #29

damoclark opened this issue Sep 1, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@damoclark
Copy link

When navigating with restic-browser, you traverse the paths of the backup by clicking through the UI on each directory at a time. Yet, when you know exactly where you need to go, or at least a pretty good idea at the start, this makes it slow and cumbersome. This is especially true because restic-browser needs to query the repo for each directory listing along the path.

To mitigate this issue, restic-browser could include a type of url bar, or a text box in which the path can be typed, thus allowing direct navigation to a known location in the backup. For example, if you needed to restore a file located in /usr/local/bin, instead of clicking on each of those directories, and waiting for the next listing to load, you would just type: /usr/local/bin and enter.

As an extension of this suggestion, restic-browser could also include tab-completion functionality for this text entry box, so when you get to a path depth, where you are no longer confident about the next directory, you can double-tab and have restic-browser look up the deepest level typed so far, and then return a drop down list (or some other UI element) so you can choose just the next level. Think just how UNIX shells work with tab completion.

With the inclusion of these two features, you can be far more productive in navigating around a backup using restic-browser.

Again, just a suggestion for consideration.

Damien.

@emuell
Copy link
Owner

emuell commented Sep 1, 2022

Except for the tab-completion, that's basically what the current text box in the Files section already does, isn't it? You can already enter a path there.

The tab-completion would certainly make it easier to use, but unfortunately we would first have to get the entire directory structure from a snapshot via restic ls --recursive. This is possible, but may take quite a while to complete. It could be done in the background once the snapshot is selected though. I will give this a try!

@damoclark
Copy link
Author

Hi Eduard,

My sincere apologies, but my memory has failed me. You are correct - the text box suggestion as I described is already implemented.

With the tab-completion, rather than needing to perform a --recursive, perhaps parse the entered path thus far to the last / separator (or \ for that other OS), and use that path for the restic ls without --recursive. Because you are only looking up the next node in the path tree. This I expect would make the completion more responsive.

Would that work?

@emuell emuell changed the title Navigation by direct path entry Add tab competition when changing root paths in file list Nov 7, 2022
@emuell emuell added the enhancement New feature or request label Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants