diff --git a/src/parallel b/src/parallel index 24f2b1dd..5024f12c 100755 --- a/src/parallel +++ b/src/parallel @@ -860,7 +860,8 @@ sub parse_options { if(defined $opt::X) { $Global::ContextReplace = 1; } if(defined $opt::silent) { $Global::verbose = 0; } if(defined $opt::0) { $/ = "\0"; } - if(defined $opt::d) { my $e="sprintf \"$opt::d\""; $/ = eval $e; } + if(defined $opt::d) { my $e="sprintf qq{$opt::d}"; $/ = eval $e; } + if(defined $opt::tagstring) { my $e="sprintf qq{$opt::tagstring}"; $opt::tagstring = eval $e; } if(defined $opt::p) { $Global::interactive = $opt::p; } if(defined $opt::q) { $Global::quoting = 1; } if(defined $opt::r) { $Global::ignore_empty = 1; } @@ -1034,7 +1035,7 @@ sub parse_options { sub init_globals { # Defaults: - $Global::version = 20150224; + $Global::version = 20150225; $Global::progname = 'parallel'; $Global::infinity = 2**31; $Global::debug = 0; diff --git a/testsuite/tests-to-run/parallel-local5.sh b/testsuite/tests-to-run/parallel-local5.sh index fcd0bcfd..641a5b28 100644 --- a/testsuite/tests-to-run/parallel-local5.sh +++ b/testsuite/tests-to-run/parallel-local5.sh @@ -119,6 +119,11 @@ echo '### Test --block size=1M -j1 - more data than cpu'; echo '### Test --pipe default settings'; cat /tmp/blocktest | parallel --pipe sort | sort -n | md5sum + +echo '### bug #44350: --tagstring should support \t'; + parallel --tagstring 'a\tb' echo ::: c + parallel -d '\t' echo ::: 'a b' + parallel -d '"' echo ::: 'a"b' EOF rm /tmp/parallel-seq /tmp/blocktest diff --git a/testsuite/wanted-results/parallel-local5 b/testsuite/wanted-results/parallel-local5 index 1a81b5ee..c98fe642 100644 --- a/testsuite/wanted-results/parallel-local5 +++ b/testsuite/wanted-results/parallel-local5 @@ -297,3 +297,12 @@ echo '### Test --block size=1M -j1 - more data than cpu'; cat /tmp/blocktest | echo '### Test --pipe default settings'; cat /tmp/blocktest | parallel --pipe sort | sort -n | md5sum ### Test --pipe default settings 8a7095c1c23bfadc311fe6b16d950582 - +echo '### bug #44350: --tagstring should support \t'; parallel --tagstring 'a\tb' echo ::: c +### bug #44350: --tagstring should support \t +a b c + parallel -d '\t' echo ::: 'a b' +a +b + parallel -d '"' echo ::: 'a"b' +a +b