In shell script code which is Bash-specific, you can use Bash features, right? 
Bash has a parameter substitution variant which does s/x/y/ replacement. No 
need to run sed. That feature still has the issue that the X is a pattern and 
not a fixed string. However, quoting will protect parts of a pattern that are 
interpolated from a variable. E.g. ${VAR//"$OLD"/$NEW} where OLD can contain 
meta chars like * and ?.

Daniel Lovasko <[email protected]> wrote:

>Hi,
>
>I worked on the issues you mentioned, what do you think about this
>revision?
>
>>>> Martin Quinson <[email protected]> 01/22/13 12:12 AM >>>
>On Mon, Jan 21, 2013 at 10:56:35AM +0100, Daniel Lovasko wrote:
>> Hi all,
>>
>> my solution for this bug: https://savannah.nongnu.org/bugs/?32093 is
>included in the attachment.
>> What do you think?
>
>> +\item[\textsf{QUILT\_COLORS}]
>> +By default, quilt uses its predefined color set in order to be more
>> +comprehensible when distiguishing various types of patches, eg.
>> +applied/unapplied, failed, etc. Setting this variable enables
>overriding
>> +values of certain subset of used colors.
>
>I would say that this is very interesting: I did not know of this
>coloring feature: the commands series and patch did not document their
>--color parameter, while push was very terse on the meaning of the
>parameter argument. I just fixed that, thanks for pointing me on it.
>
>But unfortunately, after reading this new documentation, I was very
>far from being able to use this feature. I had to dig into the code
>and googling around.
>
>I think that you need to say explicitely that the default setting is:
>diff_hdr=32:diff_add=36:diff_mod=35:diff_rem=35:diff_hunk=33:diff_ctx=35:diff_cctx=33:patch_offs=33:patch_fuzz=35:patch_fail=31:patch_applied=32:series_app=32:series_top=33:series_una=00:clear=00
>
>with a word on the syntax. It's a colon (:) separated list of
>elements, each being of the form
>  <format name>=<forground color>[;<background color>]
>
>It would be interesting to document the whole list of format names
>since some are trivially understood (such as diff_hdr) but some other
>are less obvious (such as diff_cctx but that may be just me). This may
>be part of the command's documentation (in their usage function), as
>I don't see reused color names between commands at the first glance.
>
>You also want to specify that the color code is following the
>classical bash color escaping, with information retrieved from eg,
>http://tldp.org/LDP/abs/html/colorizing.html#AEN20229
>
>After that, you can say that the content of QUILT_COLORS is simply
>used to superseed default values. So if I set
>QUILT_COLORS='diff_hdr=35;44', I'll get my diff headers in magenta
>over blue instead of the default green with background unchanged.
>
>Well, I fear that it takes a full documentation section to explain it
>all, actually.
>
>Thanks for your time,
>Mt.
>
>
>--
>Dans la france profonde, il y a surtout des spéléologues.
>   -- Le Chat
>
>_______________________________________________
>Quilt-dev mailing list
>[email protected]
>https://lists.nongnu.org/mailman/listinfo/quilt-dev
>
>
>
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Quilt-dev mailing list
>[email protected]
>https://lists.nongnu.org/mailman/listinfo/quilt-dev
_______________________________________________
Quilt-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/quilt-dev

Reply via email to