-
-
Notifications
You must be signed in to change notification settings - Fork 66
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
Open files with relative path #231
Labels
enhancement
New feature or request
Comments
I can work on this if no one else is already on it. |
Sounds good! I'll assign it to you. If you end up being unable to work on it for whatever reason, just let me know. |
justjosias
added a commit
to justjosias/amfora
that referenced
this issue
Sep 28, 2021
Local files can now be loaded by relative path, rather than the whole path preceded by the `file://` scheme indicator. It first checks whether or not the requested URL has a scheme (by checking for `://` in the URL), but also allows making intention known by specifying `./` or `../` before the URL, closely matching the behavior of Firefox. This borrows code from @singalhimanshu's PR (makew0rld#232). Resolves makew0rld#231
justjosias
added a commit
to justjosias/amfora
that referenced
this issue
Sep 28, 2021
Local files can now be loaded by relative path, rather than the whole path preceded by the `file://` scheme indicator. It first checks whether or not the requested URL has a scheme (by checking for `://` in the URL). If not, it checks to see if the file exists before opening. It also allows making intention known by specifying `./` or `../` before the URL, closely matching the behavior of Firefox. This borrows code from @singalhimanshu's PR (makew0rld#232). Resolves makew0rld#231
justjosias
added a commit
to justjosias/amfora
that referenced
this issue
Sep 28, 2021
Local files can now be loaded by relative path, rather than the whole path preceded by the `file://` scheme indicator. It first checks whether or not the requested URL has a scheme (by checking for `://` in the URL). If not, it checks to see if the file exists before opening. It also allows making intention known by specifying `./` or `../` before the URL, closely matching the behavior of Firefox. This borrows code from @singalhimanshu's PR (makew0rld#232). Resolves makew0rld#231
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Right now, Amfora can open files with a command like
amfora file:///absolute/path/to/file
. But it'd be nice if like thefirefox
command, it could just open files and folders with a relative path, likeamfora file.txt
.The code would first check if the file or folder exists, and then if not interpret it as a URL.
The text was updated successfully, but these errors were encountered: