noel-friedrich / terminal

Terminal-style Personal Homepage
https://noel-friedrich.de/terminal
MIT License
44 stars 7 forks source link

[Sugestion] Execute URL #19

Open agoodfellow123 opened 7 months ago

agoodfellow123 commented 7 months ago

I have noticed there is no way to execute .url files, what I mean by that is let's say I want to use this in my website and connect the whole website with a terminal:

So, when I type ls I see:

homepage.url page2.url page3.url

Wouldn't it be cool if we just typed page3.url or ./page3.url to go to that page?

Of course, the page should remember where we left off for example if I'm at root/folder1/folderA/ and executed page3.url it should remember its location when I go to that page but that probably requires a lot of work.

I have absolutely no knowledge of web programming languages so if this is impossible please ignore me.

noel-friedrich commented 7 months ago

Love this!

  1. I think it should be fairly straight forward to implement the saving of the current path (could simply be added as another property on the TerminalData/terminal.data object.
  2. The ./file.url syntax sounds like a good idea! This is already technically possible using href -f file.url but that's unnecessarily complex anyways. It'll probably require a few changes in the TerminalParser to include that new syntax.

If I find the time soon, I'll make it happen!