From 147a7b66554b2b13bcbf6fec1204e0cc0a1790bf Mon Sep 17 00:00:00 2001 From: Mike Burns and Eric Collins Date: Fri, 23 Dec 2016 16:18:40 -0500 Subject: Handle spaces in dotfile name In mkrc, separate the list of files with newlines instead of spaces. Change the `$IFS` when iterating to handle this. We hand the file off to rcup, which encodes the file name by replacing spaces with the bell character (`\a`). rcup then sends the file name off to lsrc, which decodes the bell back into a space. The test makes sure an `a` character is in the filename, in case some encoding goes wrong. We use tr(1) instead of sed(1) because tr(1) handles `\a`. Shoutout to Sublime Text 3 for forcing this issue. --- Makefile.am | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index fd760ad..149db29 100644 --- a/Makefile.am +++ b/Makefile.am @@ -15,6 +15,7 @@ TESTS = \ test/lsrc-sigils.t \ test/lsrc.t \ test/lsrc-symlink-dirs.t \ + test/lsrc-spaces.t \ test/lsrc-tags.t \ test/lsrc-usage.t \ test/lsrc-undotted.t \ @@ -24,6 +25,7 @@ TESTS = \ test/mkrc-host-file.t \ test/mkrc-hostname.t \ test/mkrc-simple-output.t \ + test/mkrc-spaces.t \ test/mkrc-symlink-dirs.t \ test/mkrc-tagged-file.t \ test/mkrc-usage.t \ -- cgit v1.2.3