-
Notifications
You must be signed in to change notification settings - Fork 200
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
Suggestion: Support Relative Symbolic Links in Alt-F6, F5, and F6 #546
Comments
Yes please! That checkbox'!... I'm also editing my new symlinks all the time manually. It's sad that Windows makes them so painful, and it's so nice that FAR supports them fairly conveniently -- it's just a relatively small step (that "Relative" checkbox) to make it even nicer.
|
By
I meant that sometimes when say copying a symlink from |
I see, thanks! Yes, that's a good idea. It's called "Stable symlinks" in Midnight Commander (the console-mode file manager from the homeland of symlinks :) ). (I was confused by "update link targets as needed", as a "link target" is the file a link points to -- just like you also used it in the rest of the sentence: "... point to the same target". The path to that target (so "target path" is fine) is actually the link's "value", or, alas, "contents" (as I noted previously about the confusing terminology -- BTW, just tried and FAR indeed means the "target", by "content", not the path stored in the link (its real content)... My brain still kinda refuses to accept that.) |
Alt+F6 isn't really suitable for relative symlinks due to its nature: the existing object is set in stone (because the operation is performed on the "current file") and only the new object location can be specified. Good news: F7 can also create links, including relative, in a more logical way. |
Still not sure why Alt+F6 is not suitable for relative links. The checkbox would merely be a convenience thing, not really changing the behavior. Yes, the existing object is set in stone, but we are onyl talking about whether the resulting link's target would be absolute or relative (if allowed by the link type of course) - they would still point to the same object obviously.
But how would one use to easily create a relative symlink to an existing folder without having to type the target's path manually?
Shift+F4? Did you mean Shift+F7? |
I'm not saying it's entirely unsuitable and we should not add a checkbox or something, just that the UI logic isn't that intuitive in the first place.
We probably have a keyboard shortcut for "insert path from the passive panel" somewhere.
No. F7 creates directories, Shift+F4 creates files. |
Description of the new feature or improvement
It would be handy if there was a checkbox in the Link dialog that would specify that a symbolic link to be created should be a relative one (currently only absolute symlinks are created, which you then have to manually edit to make them relative).
Proposed technical implementation details (optional)
Obviously such a functionality should be limited to the same volume. I guess if the 2 paths (link source) and destination folder where the link should be created share the same path prefix, that prefix should be removed in the link, and then appropriate relative path be substituted for the rest of the link path.
In terms of UI a checkbox in the Link dialog should be added to indicate a preference for a relative link. The value of the checkbox should be remembered and persisted between sessions.
F5 Copy and F6 Move Support (Update)
I should elaborate a bit that this feature should be extended to copy and move operations, such that when
Copy contents of symbolic links
(for copy) is not selected, i.e. we are copying/moving the links themselves, and if they happen to be relative, there should be an option in FAR's copy/move dialog to update link targets as needed, such that they continue to point to the same target.This would also, where appropriate turn relative links into absolute links - such as when copying/moving to another drive for example.
Of course, if the link is a junction, or if it is an absolute link, then no action can/should be taken (link copied/moved as is).
This however should be toggleable, i.e. be an option on a Copy/Move dialog, because often it may be appropriate to copy/move links verbatim (without reinterpretation).
The text was updated successfully, but these errors were encountered: