diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2009-11-19 14:54:17 +0100 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2009-11-19 14:54:17 +0100 |
commit | bd732f8f882ab1c5699ccbd8f1618995a46e5890 (patch) | |
tree | 9197c44c424f063078d82173ac7e3017e856413e /src | |
parent | 12e78322c5fdd633c6582b8049ed8b412b275fd6 (diff) |
print_escaped: Add a comment about escapism^wshell quoting
Diffstat (limited to 'src')
-rw-r--r-- | src/envstore.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/envstore.c b/src/envstore.c index 7cb1f68..5ca1eec 100644 --- a/src/envstore.c +++ b/src/envstore.c @@ -72,6 +72,14 @@ static FILE * store_open_new(char *file) { } +/* + * A little note on shell quoting: + * ' at beginning and end do most of the job for us, except when we have a ' + * inside the quoted value. It can't be escaped directly, so we end the quote + * (with a ') and then add an escaped '. Possible ways are \' and "'" (in this + * case, the latter is used). Afterwards another normal ' is added and the + * quoted string continues. + */ static inline void print_escaped(char *name, char *content) { unsigned int i; |