GNU bug report logs -
#35564
27.0.50; [PATCH] Tweak dired-do-shell-command warning about "wildcard" characters
Previous Next
Reported by: Kévin Le Gouguec <kevin.legouguec <at> gmail.com>
Date: Sat, 4 May 2019 18:03:02 UTC
Severity: normal
Tags: fixed, moreinfo, patch
Merged with 28969
Found in version 27.0.50
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> >> > Confirm--do you mean to send these characters as-is to the shell?
> >> > sed -e 's/foo?/foo!/' -e 's/bar?/bar!'
> >> > ^ ^
>
> I don't know about the '^' trick, if the minibuffer window is narrow
> enough to cause line wrapping the result won't be very readable. And I
> doubt a screen reader would handle this kind of thing any better than
> highlighting (someone please correct me if I'm wrong about that).
Another possibility I almost mentioned is to
use, by default, a face that uses `:box' or
`:overline', or some such properties to make
the char occurrences stand out without relying
on color. That might at least help with some
who have difficulty distinguishing color, but
it's not an ideal solution either.
I don't think we should try to jump through
too many hoops about this. The main thing,
I think, is to put the char itself in the
sentence preceding the quoted command text.
The use of `^' is not too bad, I think, even
given the problems you mention. If the char
occurrences that are problematic are not
obvious then a user can cancel the command
and check `*Messages*' for the full feedback.
> Agreed on both these points. Updated patch is below, it produces
> prompts like these (still using highlighting):
>
> echo foo*
> Send 1 occurence of ‘*’ as-is to shell? (y or n)
>
> echo foo* bar* *
> Send 2 occurences of ‘*’ as-is to shell? (y or n)
Good. But "occurrences", not "occurences".
> The last case (where there are both as-is and substituted "*") isn't so
> great without highlighting (you have to count the "*"s and work out if
> something unexpected is happening), but I think it's at least not worse
> than the current situation.
I vote for also adding the ^ indications underneath.
If you think that is too often too problematic then
maybe do something like one of these:
1. Give users a way to opt out or to remove that on
demand.
2. Automatically remove it, based on window width,
whether there are multiple lines, or whatever.
But this should be controllable by a user (e.g.
an option).
Agreed about use of screenreaders. Users should
be able to turn off the ^ indicators.
This bug report was last modified 4 years and 297 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.