[augeas-devel] Having trouble differentiating quoted vs unquoted string

Matthew Palmer matt at anchor.net.au
Wed Aug 12 20:15:28 UTC 2009


Hi Raphaël,

On Wed, Aug 12, 2009 at 10:26:21AM +0200, Raphaël Pinson wrote:
> I think I had found a solution for that in sudoers. Have a look in sudoers.aug :

[...]

> (* Variable: sto_to_spc_no_dquote *)
> let sto_to_spc_no_dquote = store /[^", \t\n\\\\]+/ (* " relax emacs *)
> 
> [...]
> 
> let parameter_lists_value        = [ label "var" . sto_to_spc_no_dquote ]
> let parameter_lists_value_dquote = [ label "var"
>                                      . del /"?/ "" . sto_to_spc_no_dquote
>                                      . del /"?/ "" ]
> 
> let parameter_lists_values = parameter_lists_value_dquote
>                            | ( sep_dquote . parameter_lists_value
>                                . ( sep_cont . parameter_lists_value )+
>                                . sep_dquote )

Thanks for the pointer.  That "put optional quotes around something that
doesn't need them" bit in p_l_v_dquote *might* be enough to get me out of a
sticky situation... time to do some more experimentation.

Thanks,
- Matt




More information about the augeas-devel mailing list