Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

crudini is not case-preserving #7

Closed
jaryn opened this Issue · 5 comments

2 participants

@jaryn
# ./crudini --merge --format=ini example.ini  <<EOF
[general]
AAA=bbb
EOF  

# tail example.ini 

[non-sh-compat]
space name=val
útf8name=val
1num=val
ls;name=val


[general]
aaa = bbb
@pixelb
Owner

Yes I agree. We should be case retentive here, but generally crudini and ini format is case insensitive. We might be able to handle in this case using optionxform as described at http://stackoverflow.com/q/1611799/4421

@jaryn jaryn referenced this issue from a commit in jaryn/crudini
@jaryn jaryn Make crudini case sensitive #7. 4fe4313
@jaryn

It is not so easy to make it case preserving yet case insensitive because the same ConfigParser is being used for the --merge as it is used for for the other operations, but so far it seems to me that that is the best way to achieve it.

@pixelb
Owner

Well --set is already case retentive. I.E. for new vars the case is as specified, and for existing vars the case as is currently in the file. Perhaps we should only use the case insensitive parser with --merge. We have an explicit parse_file("-") call in that case which could be augmented?

@jaryn

Yes. That's what I meant.

@pixelb
Owner

Resolved in commit 21bdc3b

@pixelb pixelb closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.