Backslash with CTRL+[
Backslash with CTRL+[
Hi, build 5485 does not end the path with '\' when I inserting path and filename. In previous version I use hot key CTRL+[ and then CTRL+Enter for inserting full filename (e.g. when I comparing two files - fc somefile.txt X:\Example\somefile.txt), but now if filename bad (fc somefile.txt X:\Examplesomefile.txt).
- DrKnS
- Posts: 6114
- Joined: Thu 04 Aug, 2005 06:44
- Location: Kyiv
- Has thanked: 12 times
- Been thanked: 426 times
Backslash with CTRL+[
Hi, there were reports that paths like
"c:\something\"
(note the quotes) don't work properly when passed to other programs (due to weird escaping rules), so we put the backslash outside the quotes, e.g. "c:\something"\
. And then there were other reports that this doesn't work as well in some other stupid programs that can't unquote properly. So we were like "A plague o' both your houses!" and removed the backslash completely. You can write a simple macro to put a trailing backslash wherever you prefer.Backslash with CTRL+[
Personally, I find the original behavior (before 5472) the best suited for my needs and recompile FAR with that commit removed. And would urge to recommend the return to the original functionality for the official FAR itself - after all, if someone finds the terminating backslash interfering with their "some other stupid programs", they can always write a macro to remove it, there's no need to force a change onto those who don't have this problem.
-
- Posts: 1326
- Joined: Mon 04 Apr, 2005 13:41
- Location: San Ramon, CA / Kharkov, UA
- Has thanked: 32 times
- Been thanked: 61 times
Backslash with CTRL+[
Here is a simple macro to add a backslash (silly):
or even a sillier one:
Code: Select all
Macro {
area="Shell";
key="Ctrl[ Ctrl]";
description="Backslash with Ctrl+[ ]";
action = function()
key = mf.key(akey(1));
if (key == "Ctrl[" and APanel.Left) or (key == "Ctrl]" and not APanel.Left) then
mf.print("\""..APanel.Path.."\\\"");
else
mf.print("\""..PPanel.Path.."\\\"");
end
end;
}
Code: Select all
Macro {
area="Shell";
key="Ctrl[ Ctrl]";
description="Backslash with Ctrl+[ ]";
action = function()
Keys("AKey \\")
end;
}
Last edited by Yegor on Fri 11 Oct, 2019 07:30, edited 1 time in total.
Мы не можем ждать милостей от Фара, взять их у него — наша задача! (C) Мичурин
Backslash with CTRL+[
Also missed keys
Would be nice if both variants possible:
If macros can handle all mentioned cases add it in Addons will cover all wishes.
Ctrl+Shift
Ctrl+Alt
Alt+Shift
+ [ ]Would be nice if both variants possible:
before 5472
and before 4521
.If macros can handle all mentioned cases add it in Addons will cover all wishes.
Last edited by 2useven10 on Fri 11 Oct, 2019 10:52, edited 1 time in total.
- DrKnS
- Posts: 6114
- Joined: Thu 04 Aug, 2005 06:44
- Location: Kyiv
- Has thanked: 12 times
- Been thanked: 426 times
Backslash with CTRL+[
I'm pondering about reverting to the original behaviour (pre-4521, backslash-within-quotes, "path\").
After all, it was there for 20 years and didn't cause much trouble.
I remember only 1 (one) report when it wasn't desirable - https://bugs.farmanager.com/view.php?id=3011.
Changing it literally opened a can of worms.
After all, it was there for 20 years and didn't cause much trouble.
I remember only 1 (one) report when it wasn't desirable - https://bugs.farmanager.com/view.php?id=3011.
Changing it literally opened a can of worms.
Backslash with CTRL+[
Seems like a value in far:config might be in order...
Myself, I don't really care where the backslash is, as long as it is somewhere. Both pre-5472 and pre-4521 work fine for me. Post-5472 is unusable as far as I am concerned, even with a macro (which seems to be growing to absurd proportions if it needs to recover all the functionality). But as I re-build FAR from the sources anyway, to facilitate my improvements which are not being accepted to the main source, it makes little difference to me whether there is an option or not.
Myself, I don't really care where the backslash is, as long as it is somewhere. Both pre-5472 and pre-4521 work fine for me. Post-5472 is unusable as far as I am concerned, even with a macro (which seems to be growing to absurd proportions if it needs to recover all the functionality). But as I re-build FAR from the sources anyway, to facilitate my improvements which are not being accepted to the main source, it makes little difference to me whether there is an option or not.
Last edited by pepak on Fri 11 Oct, 2019 12:08, edited 1 time in total.
Backslash with CTRL+[
Looking at the report, I would say that it actually reported something which is an error in the user's application rather than FAR: A quote belongs to the set of characters prohibited from appearing in filenames (source) and as such the application should not allow a quote to become a part of a filename. If escaping is required by the application (to facilitate passing an argument to another application, for example), it should be done consistently and not by interpreting \" as an escaped " but \C as unescaped \C. I am all for reverting the change completely.DrKnS wrote: ↑Fri 11 Oct, 2019 10:14I remember only 1 (one) report when it wasn't desirable - https://bugs.farmanager.com/view.php?id=3011.
Changing it literally opened a can of worms.
Backslash with CTRL+[
A bit more complex macros.
Choose your preference. It should not depends on DrKnS next move(s) or far3 version.
Choose your preference. It should not depends on DrKnS next move(s) or far3 version.
Last edited by 2useven10 on Fri 11 Oct, 2019 20:35, edited 6 times in total.