No bug - changed to suggestion to support for %$CLIPNAMEQ0% [TC 11.50rc4] %$CLIPNAMEq1% does not work as described

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
petermad
Power Member
Power Member
Posts: 16098
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

No bug - changed to suggestion to support for %$CLIPNAMEQ0% [TC 11.50rc4] %$CLIPNAMEq1% does not work as described

Post by *petermad »

In the help it says:
Help wrote:%$CLIPNAMEQ1%, %$CLIPNAMEQ2%, %$CLIPNAME_NEQ1%, %$CLIPNAME_NEQ2%
Like %$CLIPNAME1%, %$CLIPNAME2%, %$CLIPNAME_NE1%, %$CLIPNAME_NE2%, but surrounds name with double quotes if it contains at least one space, e.g. name 1.txt -> "name 1.txt". Use a lowercase 'q' to always surround name with double quotes.
But if I make a button like this:

Code: Select all

TOTALCMD#BAR#DATA
%COMSPEC% /K echo %$CLIPBOARDq1%

%COMMANDER_EXE%,2
Test %$CLIPBOARDq1%


-1
double quotes are still only added to names with a space. Probably because %COMSPEC% treats environment variables case insensitive.

And - would it be possible to make the Q parameter also work for all lines - that is: support %$CLIPBOARDQ0%
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Fla$her
Power Member
Power Member
Posts: 3015
Joined: 2020-01-18, 04:03 UTC

Re: [TC 11.50rc4] %$CLIPNAMEq1% does not work as described

Post by *Fla$her »

2petermad
But if I make a button like this:
The above quote doesn't mention CLIPBOARD*. I don't see a problem.
%COMSPEC% /K echo %$CLIPBOARDq1%
Even logically, it could only be 1q.
would it be possible to make the Q parameter also work for all lines - that is: support %$CLIPBOARDQ0%
For what purposes? It was like this:

Code: Select all

1
"2"
3
And you want "1 "2" 3". What for? Where is it needed?
Overquoting is evil! 👎
User avatar
petermad
Power Member
Power Member
Posts: 16098
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.50rc4] %$CLIPNAMEq1% does not work as described

Post by *petermad »

Sorry - I got a wrong button mixed up in the bug report - there is no bug - %$CLIPNAMEq1% does work as described in the Help.

%$CLIPBOARDq1% (as used in the button here above) actually does work even though it is not mentioned in the Help, but %$CLIPNAMEq1% only works for names with a space.

I would still like that the Q parameter could also be used for %$CLIPNAMEQ0% and %$CLIPNAMEq0% - so that if I have a list like:
file1.txt
file 1.txt
File2.txt

it would result as:
file1.txt "file 1.txt" File2.txt
when using %$CLIPNAMEQ0%

and as:
"file1.txt" "file 1.txt" "File2.txt"
when using %$CLIPNAMEq0%

Moderator message from: petermad » 2024-12-29, 13:35 UTC

Moved to "TC suggestions (English)" from "TC11.x bug reports (English)"
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Fla$her
Power Member
Power Member
Posts: 3015
Joined: 2020-01-18, 04:03 UTC

Re: No bug - changed to suggestion to support for %$CLIPNAMEQ0% [TC 11.50rc4] %$CLIPNAMEq1% does not work as described

Post by *Fla$her »

for %$CLIPNAMEQ0% and %$CLIPNAMEq0%
Support++
Last edited by Fla$her on 2024-12-30, 23:41 UTC, edited 1 time in total.
Overquoting is evil! 👎
User avatar
petermad
Power Member
Power Member
Posts: 16098
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: No bug - changed to suggestion to support for %$CLIPNAMEQ0% [TC 11.50rc4] %$CLIPNAMEq1% does not work as described

Post by *petermad »

It would also be nice if it is mentioned in the help that %$CLIPBOARDq1% actually is supported, and if %$CLIPBOARDQ0% and %$CLIPBOARDq0% could also be supported.
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Fla$her
Power Member
Power Member
Posts: 3015
Joined: 2020-01-18, 04:03 UTC

Re: No bug - changed to suggestion to support for %$CLIPNAMEQ0% [TC 11.50rc4] %$CLIPNAMEq1% does not work as described

Post by *Fla$her »

There is no difference between %$CLIPBOARD1% and %$CLIPBOARDQ1%. Apparently, Q is ignored here.
Overquoting is evil! 👎
User avatar
petermad
Power Member
Power Member
Posts: 16098
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: No bug - changed to suggestion to support for %$CLIPNAMEQ0% [TC 11.50rc4] %$CLIPNAMEq1% does not work as described

Post by *petermad »

But there is a difference between %$CLIPBOARD1% and %$CLIPBOARDq1%
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Fla$her
Power Member
Power Member
Posts: 3015
Joined: 2020-01-18, 04:03 UTC

Re: No bug - changed to suggestion to support for %$CLIPNAMEQ0% [TC 11.50rc4] %$CLIPNAMEq1% does not work as described

Post by *Fla$her »

This means that the absence of quotation marks in the presence of spaces for %$CLIPBOARDQ% should be attributed to bugs.
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50824
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: No bug - changed to suggestion to support for %$CLIPNAMEQ0% [TC 11.50rc4] %$CLIPNAMEq1% does not work as described

Post by *ghisler(Author) »

%$CLIPBOARDQ1% is not defined. There is no guarantee of what happens when you use that.
I would still like that the Q parameter could also be used for %$CLIPNAMEQ0% and %$CLIPNAMEq0%
I actually tried to add this when implementing %$CLIPNAMEQ1%, but it became too complex and would have caused a ton of bugs, so I removed it.
Author of Total Commander
https://www.ghisler.com
Post Reply