%Q doesn't work with %A

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: Stefan2, Hacker, petermad

User avatar
white
Power Member
Power Member
Posts: 6940
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: %Q doesn't work with %A

Post by *white »

ghisler(Author) wrote: 2026-04-26, 06:33 UTC Thanks for the suggestions, sounds all reasonable for %Ax parameters. It's still not clear what %q%A should do.
I think it still wasn't clear what %q%A1 should do too. For example, when the first paramater (%A1) has this value:

Code: Select all

"Jack said: ""Hi there!"" and Mary said ""Hello!"""
Fla$her wrote: 2026-04-26, 07:38 UTC The task is to suppress the quotes in the required area, which will be defined by two %q:
"-par1 '%q%A' -par2 '"%O"' -par3 '%|EnVar|'%q"
I specifically indicated "%O" here to account for any source of double quotes. For this reason, the last %q is placed here before ", not after.
This means that you won't have to process each parameter separately, you will just remove all the quotes in the string between the two %q.
Every first %q in the pair will simply remove all double quotes until the next %q.
But finally the suggestion seems clear: Strip all quotes from the final end result, including quotes explicitly inserted by the user.
Fla$her
Power Member
Power Member
Posts: 4033
Joined: 2020-01-18, 04:03 UTC

Re: %Q doesn't work with %A

Post by *Fla$her »

But finally the suggestion seems clear: Strip all quotes from the final end result, including quotes explicitly inserted by the user.
The point is not what I want ideally, but how much faster it can be implemented. Read the penultimate sentence and the author's earlier explanations about long tests.
Before this, I had never even thought about this approach...
Overquoting is evil! 👎
User avatar
white
Power Member
Power Member
Posts: 6940
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: %Q doesn't work with %A

Post by *white »

Fla$her wrote: 2026-04-26, 12:00 UTC
But finally the suggestion seems clear: Strip all quotes from the final end result, including quotes explicitly inserted by the user.
The point is not what I want ideally, but how much faster it can be implemented. Read the penultimate sentence and the author's earlier explanations about long tests.
Before this, I had never even thought about this approach...
The point is that this is the first suggestion that seems clear. Any other suggestions made by you weren't clear.
Fla$her
Power Member
Power Member
Posts: 4033
Joined: 2020-01-18, 04:03 UTC

Re: %Q doesn't work with %A

Post by *Fla$her »

white wrote: 2026-04-24, 11:27 UTCAs said before, people's buttons etc. that already use both %Q and %A in the parameter field will break.
Before asserting this, one needs to know about such people. But you don't know. You only know about the technical component, but obviously not about the actual needs.
white wrote: 2026-04-24, 11:27 UTCThe linked suggestion by petermad describes exactly the current implementation. It does not strip quotes that are part of the filename itself.
Well, considering that petermad confirmed the current behavior as a bug, it's not exactly what he expected.
However, that is your thought about part of the name, because the discussion was about quotation marks in general, not in names in particular.
Your answer still didn't make it clear why you did't challenge the original goal when it made sense — 4 years ago.
white wrote: 2026-04-24, 11:27 UTCExactly, it is not the same thing. The current implementation works as designed, but you want something different.
It's not the same thing, because "as designed" in your case is not related to the idea, but to the development.
white wrote: 2026-04-24, 11:27 UTCAnd you still haven't clearly said what this feature should do exactly.
You still haven't given any clear answers to my questions either:
What is a plugin system?
Again, give an example with such a file system and %Q. What do you want to achieve in interacting with names where %N returns "1" 2 "3"?

white wrote: 2026-04-26, 14:02 UTCAny other suggestions made by you weren't clear.
This is just your opinion. I could give you a few quotes with examples, but you can find them yourself.
It's more important to me that I'm understood by ghisler(Author).
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 53139
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: %Q doesn't work with %A

Post by *ghisler(Author) »

A new parameter %q (lowercase) has now been added to Total Commander 11.57 RC6.
28.04.26 Added: Internal command parameter %q (lowercase): Remove all double quotes from parameters %A1, %A2 etc. and %|envvar| (32/64)
Author of Total Commander
https://www.ghisler.com
Post Reply