]> git.ipfire.org Git - people/stevee/network.git/commitdiff
list: Allow to append arguments that start with "-"
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 9 Apr 2013 09:55:25 +0000 (11:55 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 9 Apr 2013 09:55:25 +0000 (11:55 +0200)
functions.list

index c33d4db687d37b3a53d03811d8e56f1f4cb5d7f1..3110357f2604f35252fc63d7244802d6734222e0 100644 (file)
@@ -29,9 +29,9 @@ function list_append() {
        assert isset list
 
        if [ -n "${!list}" ]; then
-               printf -v ${list} "${!list} $@"
+               printf -v ${list} -- "${!list} $@"
        else
-               printf -v ${list} "$@"
+               printf -v ${list} -- "$@"
        fi
 }