Add keybind or command to browse to parent and root dir of a site
Openopened 2 years ago by bdju · 5 comments
Reference in New Issue
There is no content yet.
Delete Branch '%!s(<nil>)'
Deleting a branch is permanent. It CANNOT be undone. Continue?
I can go back in history, but I can't go to a higher level of a site. If I'm linked to a file to read and I then want to see other files in the same dir, or the homepage of the site, I don't really know how to do so. The portal.mozz.us proxy has buttons for these functions.
The p and r keys seem unused right now. Maybe they could be bound to these things.
As an example of what I mean, if you open bombadillo directly to
gopher://rawtext.club:70/0/docs/LICENSE, it would be nice to have an easy way to then browse to
So, there is not exactly a way to do what you want.. other than copy and paste? The url is in the bar, so in the case you provided that would be the quickest way.
On the other hand, had you navigated to
gopher://rawtext.club:70/0/docs/LICENSEand you wanted to go back to the docs directory, but still have the license file in your history for easy back/forward browsing (ie. to toggle between them to some degree), you could use the
jumpcommand. Run on its own it will take the previous page (the one
backwould get you to) and copy it to the top of the history stack. So now you are on docs but pressing back would take you to license.
jumpcan take an optional number which can copy an exact history position to the top of the history stack.
I know that lengthy example is not what you wanted and that the first example is likely not what you were hoping for. I am planning to get line editing working in bombadillo so that you can use arrow keys to edit what you type. When I do so, I will likely add an
editcommand (or hot key) that will allow you to edit the current url (and thus remove any parts of it you dont need, or edit parts). I wrote an editable input library that has worked well for me in my other programs but due to some quirks of how bombadillo was written I have had trouble getting it to work here. I do plan to do so in the not distant future though, so hopefully that will solve the issue and allow some form of what you are looking for?
Definitely let me know. Unless something else comes up in conversation here I will likely close this issue, but I will open a new one to get the editable input working and add the edit url functionality.
Actually, the more I think about it... I could just add an
Uas a hot key) to pop off the last part of a url. I'm trying to think if there are any issues to that. I think it would be fine for gemini/http/etc. Gopher gives me pause. Is there any situation where the selector would not be
1for a parent directory? It does not seem like it...
If after a bit more thought the gopher thing seems fine, I may just go this route for now. That would get you a solution without a ton of code or complexity being added, and give me a little more time to get the editable input thing right.
Ok, I worked out a version of this. It had been awhile since I was working actively in this codebase, man I need to do some housecleaning.
That said: if you'd like to test out this feature you can checkout the branch
up-dirand build a copy (just run
make && ./bombadillofrom the repo directory after checking out the branch). Once you do that you will have access to the feature bound to the
u). It will take you up a level in the current url path. It will not go higher than the root directory and it will convert any gopher url to a type 1 url. Note that not all URLs generated this way will be valid for all servers. For example, a gopher server may not serve content for a url to a directory that does not have a
gophermap, or similar, file in it.
Having test driven this a bit I can definitely confirm that it is nice to have. Thanks for the request.
Sounds like what you settled on will be good! I can't easily build to test on my main distro (Guix System), unfortunately.
I actually mainly use gemini, I just picked a random link from the :help page as an example. I didn't even notice it was gopher.
Awesome. I have a few other minor things I want to work into a release and will likely include this in that release. I'll leave the issue open until the release is made and merged in and I'll comment here when i close it and tag you on it. At that time I will build binaries and update the website as well.