Ticket #340 (closed defect: fixed)
Inrorrect handling of wildcards
Reported by: | mnk | Owned by: | slavazanko |
---|---|---|---|
Priority: | minor | Milestone: | 4.7 |
Component: | mc-core | Version: | master |
Keywords: | commited-master | Cc: | |
Blocked By: | Blocking: | ||
Branch state: | Votes for changeset: |
Description
This i both a bug report and a followup of
my rant in the Gentoo bug.
The bug first:
let's start with i.e. make-0.log
press F5/F6 on it
make a '*0*' pattern
rename to '\14\2'
Expected result: make-4.log
Actual result: make-0.log4
There's also a minor issue with Ctrl-O
command path: when using its history with up key,
old content isn't properly cleared for display of the new
(commands are properly executed, though
- if you remember what they were)
Now, continuing my rant.
I've just read http://mail.gnome.org/archives/mc-devel/2009-May/msg00001.html
IMHO, it's completely silly.
While you, guys, did an awful mess,
especially with 4.6.2 mhl fiasco,
the original developer should find the guts to either pull
the plug on the project or find new people to maintain it,
cause that he doesn't see it as dead, doesn't make it any more alive. By now mc is not mature, it's overripe,
bordering on decaying.
Yes, some cleanup of the things you've already did
would be very nice, but pushing all of the proper patches
through review process would put the project where it is now,
decomposing in the cvs coffin.
On a related note, this page could use a forum,
rants better fit there and the mailing list is claimed
by the other side (and bad pace for rants).
Change History
comment:2 Changed 15 years ago by slavazanko
- Status changed from new to accepted
- Owner set to slavazanko
- Blocking 381 removed
press F5/F6 on it
make a '*0*' pattern
rename to '\14\2'
Hm... this mean, all '*' need to translate into (.*) regex...
And, next trouble, search engine handle up to 64 groups pattern match.
for example:
Original string: _1_ _2_ _3_ _4_ _5_ _6_ _7_ _8_ _9_ _10_ _11_ _12_ _13_ _14_ Search pattern: (_1_) (_2_) (_3_) (_4_) (_5_) (_6_) (_7_) (_8_) (_9_) (_10_) (_11_) (_12_) (_13_) (_14_) Replace rule: \1 ... \14 Result: _1_ ... _14_
In this case:
rename to '\14\2'
I don't know how will better... may be, '\014\2' or '\{1}4\2'?
Yes, some cleanup of the things you've already did would be very nice, but pushing all of the proper patches through review process would put the project where it is now, decomposing in the cvs coffin.
I'm agree with you. Old development scheme, IMHO, little bit deprecated. Of course, we make mistakes (in 'master' branch too). But better to ask forgiveness than permission. If I'm make a mistake (bug) - I'm apologize and fixed it, This better, what I'm will not make mistakes and that nothing will do but I will wait for permission to do.
Sorry, guys from official devel-team, if the offended. Midnight Commander is in demand, therefore, remain in place it can not be...
comment:3 Changed 15 years ago by slyfox
rename to '\14\2'
I'd suggest to limit substitution by 1 digit (\1 to \9). Then above ambiguity will be parsed as \1, "4", \2 (not as \14, \2). Other solutions look weird enough and require additional syntax to introduce.
Actually, I can't imagine unambiguous realworld example for more that 9 groups. (sed/perl/what-you-like might be better in this case).
Otherwise:
I don't know how will better... may be, '\014\2' or '\{1}4\2'?
if I just need "{", \1, "}", then i would have to type smth like: \{\1\}. Looks ugly.
comment:4 Changed 15 years ago by slavazanko
created branch 340_inrorrect_handling_of_wildcards (parent: master)
Initial commit: 225157296ff1057874fce7a7d18ff9d0be07291a
see git log b6e44284da3a015504f994dc0ec7b3a58da3853d...43f7214279e2329246ea5b2aeaa0fe8847007666
for descriptions of pathes
see git diff b6e44284da3a015504f994dc0ec7b3a58da3853d...43f7214279e2329246ea5b2aeaa0fe8847007666
for complex patch.
comment:10 Changed 15 years ago by slyfox
- Keywords vote-slyfox approved added; review removed
This but fixes many issues with meta stuff.
Especially it fixes copying to weird directories, like:
[1.]
'?*' -> './\1/\1\2' (puts files abc,bcd to a/abc, /b/bcd for example)
[2.]
if you create '\1' dir and try to copy there file it will autoescape.
Dialog will look like:
'*' -> '
1'/ (which is correct now, but wasn't before)
But fix [2.] introduces another bug - completion stuff does not expect copy widgets may operate with escaped/unescaped directories. But it's a matter of separate ticket.
So, my vote here.
comment:11 Changed 15 years ago by slyfox
- Keywords committed-master added; vote-angel_il vote-slyfox approved removed
- Status changed from accepted to testing
- Resolution set to fixed
comment:13 Changed 15 years ago by mnk
One minor correction:
src/filegui.c should get '#include "../src/strescape.h"' line
to avoid warnings.
comment:14 Changed 15 years ago by slavazanko
- Status changed from closed to reopened
- Resolution fixed deleted
comment:15 Changed 15 years ago by slavazanko
- Keywords review added; committed-master removed
- Status changed from reopened to accepted
mnk, thanks for your bugreports. This real help for us.
Created branch 340_forgotten_include (parent: master)
initial changeset:80ad54decb355b9e8a40136573a9b72ecd65ff7c
comment:18 Changed 15 years ago by slavazanko
- Status changed from accepted to testing
- Keywords commited-master added; vote-angel_il vote-andrew_b approved removed
- Version changed from 4.6.2 to master
- Resolution set to fixed
comment:20 Changed 15 years ago by slavazanko
- Blocking 305 removed
(In #305) created branch 305_extra_character_on_renaming (parent: master)
Initial: changeset:60f329401c1775ce392ea4587844b01cad71030a
Previous branch '305_utf8_renaming' was deleted.
review&vote.
(In #381) Actually, this one problem with #340
If #340 will fixed, this bug will fixed too