This forum uses cookies. Click X button to hide this message. What is stored? 
Total Commander Forum Index Total Commander
Forum - Public Discussion and Support
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

define colors by file type joker character

 
Post new topic   Reply to topic    Total Commander Forum Index -> TC7.56(a)/7.57 bug reports (English) Printable version
View previous topic :: View next topic  
Author Message
spd
Junior Member
Junior Member


Joined: 18 Dec 2011
Posts: 7

PostPosted: Thu Mar 15, 2012 11:38 am    Post subject: define colors by file type joker character Reply with quote

Hello! There is something strange around the "define colors by file type" function: as far as I know, a file extension mustn't have a dot. If I add to a color block something similar to *.r0* (rar slice), then the applied dot is not the last (which separates the extension), but the first occurrance, in order of the defined color blocks.

Sample color blocks:
*.exe -- brown
*.r0* -- green
*.jpg -- red
font color for unknown types: navy

result:
test.r01 -- green
test.r01.exe -- brown
test.r01.jpg -- green (jpg, should be red)
test.r01.xyz -- green (unknown file type, should be navy)

with *.r0? (instead of *.r0*) works fine:
test.r01 -- green
test.r01.exe -- brown
test.r01.jpg -- red
test.r01.xyz -- navy

I've found this in the v7.56a, so I updated to the new 7.57a, which works the same way.
Back to top
View user's profile Send private message
MVV
Power Member
Power Member


Joined: 03 Aug 2008
Posts: 7861
Location: Russian Federation

PostPosted: Thu Mar 15, 2012 11:58 am    Post subject: Reply with quote

Problem is that * matches any number of any characters including any number of dots. When you type mask *.r0*, it is unclear that this dot must be the last.

So you may use mask like *.r?;*.r??;*.r??? or template with regex pattern like \.r\d+$.
_________________
TCFS2 + TCFS2Tools: Full-screen mode for TC etc (forum)
TOTALCMD.NET: AskParam, CopyTree, NTLinks, Sudo, VirtualPanel…


Last edited by MVV on Thu Mar 22, 2012 3:57 am; edited 2 times in total
Back to top
View user's profile Send private message Send e-mail
white
Power Member
Power Member


Joined: 19 Nov 2003
Posts: 2020
Location: Netherlands

PostPosted: Thu Mar 22, 2012 2:18 am    Post subject: Reply with quote

MVV wrote:
So you may use mask like ... or template with regex pattern like .*\.r\d+.

Add a "$" at the end to make it work. Wink
Back to top
View user's profile Send private message Send e-mail
MVV
Power Member
Power Member


Joined: 03 Aug 2008
Posts: 7861
Location: Russian Federation

PostPosted: Thu Mar 22, 2012 3:52 am    Post subject: Reply with quote

white, you're right, that's better (I forgot that partial match works here instead of full one). And \.r\d+$ is the best. Smile
_________________
TCFS2 + TCFS2Tools: Full-screen mode for TC etc (forum)
TOTALCMD.NET: AskParam, CopyTree, NTLinks, Sudo, VirtualPanel…
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Total Commander Forum Index -> TC7.56(a)/7.57 bug reports (English) All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Impressum: This site is maintained by Ghisler Software GmbH

Using phpBB © 2001-2005 phpBB Group