env_parallel: --end-session implemented.

This commit is contained in:
Ole Tange 2019-01-18 16:15:47 +01:00
parent e79d1d978b
commit 4234c24658
15 changed files with 1503 additions and 129 deletions

132
citation-notice-faq.txt Normal file
View file

@ -0,0 +1,132 @@
== Citation notice FAQ ==
> Why does GNU Parallel show a citation notice?
GNU Parallel is indirectly funded through citations. It is therefore important for the long term survival of GNU Parallel that it is cited. The citation notice makes users aware of this.
See also: https://lists.gnu.org/archive/html/parallel/2013-11/msg00006.html
> Is the citation notice compatible with GPLv3?
Yes. The wording has been cleared by Richard M. Stallman to be compatible with GPLv3. This is because the citation notice is not part of the license, but part of academic tradition.
Therefore the notice is not adding a term that would require citation as mentioned on: https://www.gnu.org/licenses/gpl-faq.en.html#RequireCitation
> Do automated scripts break if the notice is not silenced?
No. Not a single time has that happened. This is due to the notice only being printed, if the output is to the screen - not if the output is to a file or a pipe.
> How do I silence the citation notice?
Run this once:
parallel --citation
It takes less than 10 seconds to do and is thus comparable to an 'OK. Do not show this again'-dialog box seen in Firefox and similar programs.
It is even optional to run this, as GNU Parallel will work without having 'parallel --citation' run first (in other words it is _not_ comparable to a clickwrap license, that must be accepted before the program will run). However, not running it does not change that academic tradition requires you to cite in scientific articles. That tradition requires you to cite even if there had been no notice.
> I do not write scientific articles. Does the notice apply to me?
No. The notice only applies if you write scientific articles.
> What shows citing software is an academic tradition?
These links say: Yes, you should cite software, and if the author suggests a way of citing, use that.
* https://blog.apastyle.org/apastyle/2015/01/how-to-cite-software-in-apa-style.html
* https://libguides.mit.edu/c.php?g=551454&p=3900280
* https://www.software.ac.uk/how-cite-software
* https://aut.ac.nz.libguides.com/APA6th/software
* https://libguides.rgu.ac.uk/c.php?g=380081&p=2983956
* https://journals.aas.org/policy-statement-on-software/
* https://guides.lib.monash.edu/c.php?g=219786&p=1454293
* https://www.maxqda.com/how-to-cite-maxqda
If you feel the benefit from using GNU Parallel is too small to warrant a citation, then prove that by simply using another tool. If you replace your use of GNU Parallel with another tool, you obviously do not have to cite GNU Parallel. If it is too much work replacing the use of GNU Parallel, then it is a good indication that the benefit is big enough to warrant a citation.
> Do other software show how to cite?
Here are other examples of software showing how to cite. Some of these refer to peer-reviewed articles - others do not:
* https://www.scipy.org/citing.html
* https://octave.org/doc/interpreter/Citing-Octave-in-Publications.html
(Octave has citation for individual packages, too)
* https://stat.ethz.ch/pipermail/r-help/2008-May/161481.html
* https://stat.ethz.ch/R-manual/R-devel/library/utils/html/citation.html
(R has citation for individual packages, too)
* http://www.partek.com/citing-partek-software-in-a-publication/
* http://www.fluortools.com/misc/cite
* https://www.maxqda.com/how-to-cite-maxqda
* https://www.open-mpi.org/papers/
* https://www.tensorflow.org/about/bib
* http://www.fon.hum.uva.nl/paul/praat.html
> I do not like the notice. Can I fork GNU Parallel and remove it?
Yes. GNU Parallel is released under GNU GPLv3 and thus you are allowed to fork the code. But you have to make sure that your forked version cannot be confused with the original, so for one thing you cannot call it anything similar to GNU Parallel as that would cause confusion between your forked version and the original. This is also why we have CentOS (and not RedHat Free), and IceCat (and not Firefox Free). This is also covered in DFSG ("The license may require derived works to carry a different name or version number from the original software").
This principle has even been tested in court:
http://www.inta.org/INTABulletin/Pages/GERMANYGeneralPublicLicenseDoesNotPermitUseofThird-PartyTrademarksforAdvertisingModifiedVersionsofOpen-SourceSoftware.aspx
https://www.admody.com/urteilsdatenbank/cafe6fdaeed3/OLG-Duesseldorf_Urteil_vom_28-September-2010_Az_I-20-U-41-09
Also know that if you fork GNU Parallel and remove the notice, you are not helping to fund further develpment. So if you like GNU Parallel and want it to be maintained in the future, then this is a bad idea, as it will give less funding.
> How important is the notice for the survival of GNU Parallel?
Citations is what indirectly funds maintaining GNU Parallel. Before the citation notice was implemented hardly anyone cited GNU Parallel, and that would not have been sustainable in the long term. Funding development aligns well with "We will give back to the free software community" and "To accelerate innovation and underpin operations".
Therefore it is more important to keep the notice than to be included in different distributions. Specifically, it will be preferable to be moved from Debian main to Debian non-free over having the notice removed (and staying in main).
In other words: It is preferable having fewer users, who all know they should cite, over having many users, who do not know they should cite.
If the goal had been to get more users, then the license would have been public domain.
This is because a long term survival with funding is more important than short term gains in popularity that can be achieved by being distributed as part of a distribution.
> Is there another way I can get rid of the citation notice?
Yes. Find a way to finance future development of GNU Parallel. If you pay me a normal salary, I will be happy to remove the citation notice.
The citation notice is about (indirect) funding - nothing else.
> I do not think it is fair having to cite
If the inconvenience of having to cite is too big for you, then you should use another tool.
If you do not want to help fund GNU Parallel, then you will not be a happy GNU Parallel user, and thus you using another tool is the best solution for all parties. Here is a list of parallelizing tools to help you find an alternative: https://www.gnu.org/software/parallel/parallel_alternatives.html
> I do not want to run 'parallel --citation'
If the inconvenience of running 'parallel --citation' one single time after installing GNU Parallel is too big, then you do not have to do it. You only need to do that if you do not want to see the citation notice.
But it really only takes 10 seconds to run.
> I do not want to see the citation notice at every run
You do not have to. Spend 10 seconds on running 'parallel --citation' and the notice is silenced. This is similar to clicking 'OK. Do not show this again' in a dialog box seen in Firefox and similar programs.
If GNU Parallel does not save you more than 10 seconds, then you should probably not be using it anyway.
> I do not want my users to see the citation notice and I do not want to finance the development
If you care so little about GNU Parallel that you do not want to help finance development, then you should contemplate whether GNU Parallel is really the right tool for you.
It is, however, doable (e.g. by forking and changing the code). But you will be going against the wishes of the author, because you make it harder to make a living, thus you will be making it harder to justify producing more free software. If you like GNU Parallel and want to see it maintained in the future, then this is not the way to go.
Maybe it is you Nadia Eghbal addresses in https://www.slideshare.net/NadiaEghbal/consider-the-maintainer:
"Is it alright to compromise, or even deliberately ignore, the happiness of maintainers so we that can enjoy free and open source software?"

View file

@ -205,7 +205,7 @@ from:tange@gnu.org
to:parallel@gnu.org, bug-parallel@gnu.org to:parallel@gnu.org, bug-parallel@gnu.org
stable-bcc: Jesse Alama <jessealama@fastmail.fm> stable-bcc: Jesse Alama <jessealama@fastmail.fm>
Subject: GNU Parallel 20190122 ('Indonesia=Tanjung Lesung=Sunda') released <<[stable]>> Subject: GNU Parallel 20190122 ('Shutdown/Indonesia=Tanjung Lesung=Sunda') released <<[stable]>>
GNU Parallel 20190122 ('') <<[stable]>> has been released. It is available for download at: http://ftpmirror.gnu.org/parallel/ GNU Parallel 20190122 ('') <<[stable]>> has been released. It is available for download at: http://ftpmirror.gnu.org/parallel/
@ -219,6 +219,8 @@ New in this release:
* Using GNU Parallel in pentesting https://youtu.be/mZ0OUJmkIlA?t=873 * Using GNU Parallel in pentesting https://youtu.be/mZ0OUJmkIlA?t=873
* Supercomputer Workshop: Feb 1&7 http://www.ece.unm.edu/featured-students/supercomputer-workshop-feb-17.html
* Bug fixes and man page updates. * Bug fixes and man page updates.
Get the book: GNU Parallel 2018 http://www.lulu.com/shop/ole-tange/gnu-parallel-2018/paperback/product-23558902.html Get the book: GNU Parallel 2018 http://www.lulu.com/shop/ole-tange/gnu-parallel-2018/paperback/product-23558902.html

View file

@ -181,10 +181,10 @@ env_parallel() {
# type returns: # type returns:
# ll is an alias for ls -l (in ash) # ll is an alias for ls -l (in ash)
# bash is a tracked alias for /bin/bash # bash is a tracked alias for /bin/bash
# true is a shell builtin # true is a shell builtin (in bash)
# myfunc is a function (in bash) # myfunc is a function (in bash)
# myfunc is a shell function (in zsh) # myfunc is a shell function (in zsh)
# which is /usr/bin/which # which is /usr/bin/which (in sh, bash)
# which is hashed (/usr/bin/which) # which is hashed (/usr/bin/which)
# aliased to `alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde' # aliased to `alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
# Return 0 if found, 1 otherwise # Return 0 if found, 1 otherwise
@ -233,13 +233,37 @@ env_parallel() {
if perl -e 'exit grep { /^--session$/ } @ARGV' -- "$@"; then if perl -e 'exit grep { /^--session$/ } @ARGV' -- "$@"; then
true skip true skip
else else
PARALLEL_IGNORED_NAMES="`_names_of_ALIASES; # Insert ::: between each level of session
# so you can pop off the last ::: at --end-session
PARALLEL_IGNORED_NAMES="`echo \"$PARALLEL_IGNORED_NAMES\";
echo :::;
(_names_of_ALIASES;
_names_of_FUNCTIONS; _names_of_FUNCTIONS;
_names_of_VARIABLES`" _names_of_VARIABLES) | perl -ne '
BEGIN{
map { $ignored_vars{$_}++ }
split/\s+/, $ENV{PARALLEL_IGNORED_NAMES};
}
chomp;
for(split/\s+/) {
if(not $ignored_vars{$_}) {
print $_,\"\\n\";
}
}
'`"
export PARALLEL_IGNORED_NAMES export PARALLEL_IGNORED_NAMES
return 0 return 0
fi fi
if perl -e 'exit grep { /^--end.?session$/ } @ARGV' -- "$@"; then
true skip
else
# Pop off last ::: from PARALLEL_IGNORED_NAMES
PARALLEL_IGNORED_NAMES="`perl -e '
$ENV{PARALLEL_IGNORED_NAMES} =~ s/(.*):::.*?$/$1/s;
print $ENV{PARALLEL_IGNORED_NAMES}
'`"
return 0
fi
# Grep alias names # Grep alias names
_alias_NAMES="`_names_of_ALIASES | _remove_bad_NAMES | xargs echo`" _alias_NAMES="`_names_of_ALIASES | _remove_bad_NAMES | xargs echo`"
_list_alias_BODIES="_bodies_of_ALIASES $_alias_NAMES" _list_alias_BODIES="_bodies_of_ALIASES $_alias_NAMES"

View file

@ -229,13 +229,37 @@ env_parallel() {
if [ "`perl -e 'exit grep { /^--session$/ } @ARGV' -- "$@"; echo $?`" == 0 ] ; then if [ "`perl -e 'exit grep { /^--session$/ } @ARGV' -- "$@"; echo $?`" == 0 ] ; then
true skip true skip
else else
PARALLEL_IGNORED_NAMES="`_names_of_ALIASES; # Insert ::: between each level of session
# so you can pop off the last ::: at --end-session
PARALLEL_IGNORED_NAMES="`echo \"$PARALLEL_IGNORED_NAMES\";
echo :::;
(_names_of_ALIASES;
_names_of_FUNCTIONS; _names_of_FUNCTIONS;
_names_of_VARIABLES`" _names_of_VARIABLES) | perl -ne '
BEGIN{
map { $ignored_vars{$_}++ }
split/\s+/, $ENV{PARALLEL_IGNORED_NAMES};
}
chomp;
for(split/\s+/) {
if(not $ignored_vars{$_}) {
print $_,\"\\n\";
}
}
'`"
export PARALLEL_IGNORED_NAMES export PARALLEL_IGNORED_NAMES
return 0 return 0
fi fi
if [ "`perl -e 'exit grep { /^--end.?session$/ } @ARGV' -- "$@"; echo $?`" == 0 ] ; then
true skip
else
# Pop off last ::: from PARALLEL_IGNORED_NAMES
PARALLEL_IGNORED_NAMES="`perl -e '
$ENV{PARALLEL_IGNORED_NAMES} =~ s/(.*):::.*?$/$1/s;
print $ENV{PARALLEL_IGNORED_NAMES}
'`"
return 0
fi
# Grep alias names # Grep alias names
_alias_NAMES="`_names_of_ALIASES | _remove_bad_NAMES | xargs echo`" _alias_NAMES="`_names_of_ALIASES | _remove_bad_NAMES | xargs echo`"
_list_alias_BODIES="_bodies_of_ALIASES $_alias_NAMES" _list_alias_BODIES="_bodies_of_ALIASES $_alias_NAMES"

View file

@ -181,10 +181,10 @@ env_parallel() {
# type returns: # type returns:
# ll is an alias for ls -l (in ash) # ll is an alias for ls -l (in ash)
# bash is a tracked alias for /bin/bash # bash is a tracked alias for /bin/bash
# true is a shell builtin # true is a shell builtin (in bash)
# myfunc is a function (in bash) # myfunc is a function (in bash)
# myfunc is a shell function (in zsh) # myfunc is a shell function (in zsh)
# which is /usr/bin/which # which is /usr/bin/which (in sh, bash)
# which is hashed (/usr/bin/which) # which is hashed (/usr/bin/which)
# aliased to `alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde' # aliased to `alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
# Return 0 if found, 1 otherwise # Return 0 if found, 1 otherwise
@ -233,13 +233,37 @@ env_parallel() {
if perl -e 'exit grep { /^--session$/ } @ARGV' -- "$@"; then if perl -e 'exit grep { /^--session$/ } @ARGV' -- "$@"; then
true skip true skip
else else
PARALLEL_IGNORED_NAMES="`_names_of_ALIASES; # Insert ::: between each level of session
# so you can pop off the last ::: at --end-session
PARALLEL_IGNORED_NAMES="`echo \"$PARALLEL_IGNORED_NAMES\";
echo :::;
(_names_of_ALIASES;
_names_of_FUNCTIONS; _names_of_FUNCTIONS;
_names_of_VARIABLES`" _names_of_VARIABLES) | perl -ne '
BEGIN{
map { $ignored_vars{$_}++ }
split/\s+/, $ENV{PARALLEL_IGNORED_NAMES};
}
chomp;
for(split/\s+/) {
if(not $ignored_vars{$_}) {
print $_,\"\\n\";
}
}
'`"
export PARALLEL_IGNORED_NAMES export PARALLEL_IGNORED_NAMES
return 0 return 0
fi fi
if perl -e 'exit grep { /^--end.?session$/ } @ARGV' -- "$@"; then
true skip
else
# Pop off last ::: from PARALLEL_IGNORED_NAMES
PARALLEL_IGNORED_NAMES="`perl -e '
$ENV{PARALLEL_IGNORED_NAMES} =~ s/(.*):::.*?$/$1/s;
print $ENV{PARALLEL_IGNORED_NAMES}
'`"
return 0
fi
# Grep alias names # Grep alias names
_alias_NAMES="`_names_of_ALIASES | _remove_bad_NAMES | xargs echo`" _alias_NAMES="`_names_of_ALIASES | _remove_bad_NAMES | xargs echo`"
_list_alias_BODIES="_bodies_of_ALIASES $_alias_NAMES" _list_alias_BODIES="_bodies_of_ALIASES $_alias_NAMES"

View file

@ -164,11 +164,12 @@ env_parallel() {
# type returns: # type returns:
# ll is an alias for ls -l (in ash) # ll is an alias for ls -l (in ash)
# bash is a tracked alias for /bin/bash # bash is a tracked alias for /bin/bash
# true is a shell builtin # true is a shell builtin (in bash)
# myfunc is a function (in bash) # myfunc is a function (in bash)
# myfunc is a shell function (in zsh) # myfunc is a shell function (in zsh)
# which is /usr/bin/which # which is /usr/bin/which (in sh, bash)
# which is hashed (/usr/bin/which) # which is hashed (/usr/bin/which)
# gi is aliased to `grep -i' (in bash)
# aliased to `alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde' # aliased to `alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
# Return 0 if found, 1 otherwise # Return 0 if found, 1 otherwise
LANG=C type "$@" | LANG=C type "$@" |
@ -216,13 +217,37 @@ env_parallel() {
if perl -e 'exit grep { /^--session$/ } @ARGV' -- "$@"; then if perl -e 'exit grep { /^--session$/ } @ARGV' -- "$@"; then
true skip true skip
else else
PARALLEL_IGNORED_NAMES="`_names_of_ALIASES; # Insert ::: between each level of session
# so you can pop off the last ::: at --end-session
PARALLEL_IGNORED_NAMES="`echo \"$PARALLEL_IGNORED_NAMES\";
echo :::;
(_names_of_ALIASES;
_names_of_FUNCTIONS; _names_of_FUNCTIONS;
_names_of_VARIABLES`" _names_of_VARIABLES) | perl -ne '
BEGIN{
map { $ignored_vars{$_}++ }
split/\s+/, $ENV{PARALLEL_IGNORED_NAMES};
}
chomp;
for(split/\s+/) {
if(not $ignored_vars{$_}) {
print $_,\"\\n\";
}
}
'`"
export PARALLEL_IGNORED_NAMES export PARALLEL_IGNORED_NAMES
return 0 return 0
fi fi
if perl -e 'exit grep { /^--end.?session$/ } @ARGV' -- "$@"; then
true skip
else
# Pop off last ::: from PARALLEL_IGNORED_NAMES
PARALLEL_IGNORED_NAMES="`perl -e '
$ENV{PARALLEL_IGNORED_NAMES} =~ s/(.*):::.*?$/$1/s;
print $ENV{PARALLEL_IGNORED_NAMES}
'`"
return 0
fi
# Grep alias names # Grep alias names
_alias_NAMES="`_names_of_ALIASES | _remove_bad_NAMES | xargs echo`" _alias_NAMES="`_names_of_ALIASES | _remove_bad_NAMES | xargs echo`"
_list_alias_BODIES="_bodies_of_ALIASES $_alias_NAMES" _list_alias_BODIES="_bodies_of_ALIASES $_alias_NAMES"

View file

@ -167,11 +167,12 @@ env_parallel() {
# type returns: # type returns:
# ll is an alias for ls -l (in ash) # ll is an alias for ls -l (in ash)
# bash is a tracked alias for /bin/bash # bash is a tracked alias for /bin/bash
# true is a shell builtin # true is a shell builtin (in bash)
# myfunc is a function (in bash) # myfunc is a function (in bash)
# myfunc is a shell function (in zsh) # myfunc is a shell function (in zsh)
# which is /usr/bin/which # which is /usr/bin/which (in sh, bash)
# which is hashed (/usr/bin/which) # which is hashed (/usr/bin/which)
# gi is aliased to `grep -i' (in bash)
# aliased to `alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde' # aliased to `alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
# Return 0 if found, 1 otherwise # Return 0 if found, 1 otherwise
LANG=C type "$@" | LANG=C type "$@" |
@ -219,13 +220,37 @@ env_parallel() {
if perl -e 'exit grep { /^--session$/ } @ARGV' -- "$@"; then if perl -e 'exit grep { /^--session$/ } @ARGV' -- "$@"; then
true skip true skip
else else
PARALLEL_IGNORED_NAMES="`_names_of_ALIASES; # Insert ::: between each level of session
# so you can pop off the last ::: at --end-session
PARALLEL_IGNORED_NAMES="`echo \"$PARALLEL_IGNORED_NAMES\";
echo :::;
(_names_of_ALIASES;
_names_of_FUNCTIONS; _names_of_FUNCTIONS;
_names_of_VARIABLES`" _names_of_VARIABLES) | perl -ne '
BEGIN{
map { $ignored_vars{$_}++ }
split/\s+/, $ENV{PARALLEL_IGNORED_NAMES};
}
chomp;
for(split/\s+/) {
if(not $ignored_vars{$_}) {
print $_,\"\\n\";
}
}
'`"
export PARALLEL_IGNORED_NAMES export PARALLEL_IGNORED_NAMES
return 0 return 0
fi fi
if perl -e 'exit grep { /^--end.?session$/ } @ARGV' -- "$@"; then
true skip
else
# Pop off last ::: from PARALLEL_IGNORED_NAMES
PARALLEL_IGNORED_NAMES="`perl -e '
$ENV{PARALLEL_IGNORED_NAMES} =~ s/(.*):::.*?$/$1/s;
print $ENV{PARALLEL_IGNORED_NAMES}
'`"
return 0
fi
# Grep alias names # Grep alias names
_alias_NAMES="`_names_of_ALIASES | _remove_bad_NAMES | xargs echo`" _alias_NAMES="`_names_of_ALIASES | _remove_bad_NAMES | xargs echo`"
_list_alias_BODIES="_bodies_of_ALIASES $_alias_NAMES" _list_alias_BODIES="_bodies_of_ALIASES $_alias_NAMES"

View file

@ -9,7 +9,8 @@ env_parallel - export environment to GNU parallel
=head1 SYNOPSIS =head1 SYNOPSIS
B<env_parallel> [options for GNU Parallel] B<env_parallel> [--record-env|--session|--end-session]
[options for GNU Parallel]
=head1 DESCRIPTION =head1 DESCRIPTION
@ -66,7 +67,6 @@ In B<csh> B<--session> is not supported:
# Use --env _ to only transfer the names not in the "empty" environment # Use --env _ to only transfer the names not in the "empty" environment
env_parallel --env _ -S localhost myalias ::: Yay, env_parallel --env _ -S localhost myalias ::: Yay,
=head2 Environment space =head2 Environment space
By default B<env_parallel> will export all environment variables, By default B<env_parallel> will export all environment variables,
@ -91,7 +91,47 @@ DESCRIPTION.
=head1 OPTIONS =head1 OPTIONS
Same as GNU B<parallel>. Same as GNU B<parallel> in addition to these:
=over 4
=item B<--end-session>
Undo last B<--session>
=item B<--record-env>
Record all names currently defined to be ignored every time running
B<env_parallel> in the future.
=item B<--session>
Ignore all names currently defined. Aliases, variables, arrays, and
functions currently defined will not be transferred.
But names defined I<after> running B<parallel --session> I<will> be
transferred.
This is only valid in the running shell, and can be undone with
B<parallel --end-session>.
You can run multiple B<--session> inside each other:
env_parallel --session
var=not
# var is transferred
env_parallel -Slocalhost 'echo var is $var' ::: ignored
env_parallel --session
# var is not transferred
env_parallel -Slocalhost 'echo var is $var' ::: ignored
env_parallel --end-session
# var is transferred again
env_parallel -Slocalhost 'echo var is $var' ::: ignored
=back
=head1 SUPPORTED SHELLS =head1 SUPPORTED SHELLS

View file

@ -187,6 +187,7 @@ env_parallel() {
# which is /usr/bin/which (in sh, bash) # which is /usr/bin/which (in sh, bash)
# which is hashed (/usr/bin/which) # which is hashed (/usr/bin/which)
# gi is aliased to `grep -i' (in bash) # gi is aliased to `grep -i' (in bash)
# aliased to `alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
# Return 0 if found, 1 otherwise # Return 0 if found, 1 otherwise
LANG=C type "$@" | LANG=C type "$@" |
perl -pe '$exit += (s/ is an alias for .*// || perl -pe '$exit += (s/ is an alias for .*// ||
@ -233,13 +234,37 @@ env_parallel() {
if perl -e 'exit grep { /^--session$/ } @ARGV' -- "$@"; then if perl -e 'exit grep { /^--session$/ } @ARGV' -- "$@"; then
true skip true skip
else else
PARALLEL_IGNORED_NAMES="`_names_of_ALIASES; # Insert ::: between each level of session
# so you can pop off the last ::: at --end-session
PARALLEL_IGNORED_NAMES="`echo \"$PARALLEL_IGNORED_NAMES\";
echo :::;
(_names_of_ALIASES;
_names_of_FUNCTIONS; _names_of_FUNCTIONS;
_names_of_VARIABLES`" _names_of_VARIABLES) | perl -ne '
BEGIN{
map { $ignored_vars{$_}++ }
split/\s+/, $ENV{PARALLEL_IGNORED_NAMES};
}
chomp;
for(split/\s+/) {
if(not $ignored_vars{$_}) {
print $_,\"\\n\";
}
}
'`"
export PARALLEL_IGNORED_NAMES export PARALLEL_IGNORED_NAMES
return 0 return 0
fi fi
if perl -e 'exit grep { /^--end.?session$/ } @ARGV' -- "$@"; then
true skip
else
# Pop off last ::: from PARALLEL_IGNORED_NAMES
PARALLEL_IGNORED_NAMES="`perl -e '
$ENV{PARALLEL_IGNORED_NAMES} =~ s/(.*):::.*?$/$1/s;
print $ENV{PARALLEL_IGNORED_NAMES}
'`"
return 0
fi
# Grep alias names # Grep alias names
_alias_NAMES="`_names_of_ALIASES | _remove_bad_NAMES | xargs echo`" _alias_NAMES="`_names_of_ALIASES | _remove_bad_NAMES | xargs echo`"
_list_alias_BODIES="_bodies_of_ALIASES $_alias_NAMES" _list_alias_BODIES="_bodies_of_ALIASES $_alias_NAMES"

View file

@ -158,11 +158,12 @@ env_parallel() {
# type returns: # type returns:
# ll is an alias for ls -l (in ash) # ll is an alias for ls -l (in ash)
# bash is a tracked alias for /bin/bash # bash is a tracked alias for /bin/bash
# true is a shell builtin # true is a shell builtin (in bash)
# myfunc is a function (in bash) # myfunc is a function (in bash)
# myfunc is a shell function (in zsh) # myfunc is a shell function (in zsh)
# which is /usr/bin/which # which is /usr/bin/which (in sh, bash)
# which is hashed (/usr/bin/which) # which is hashed (/usr/bin/which)
# gi is aliased to `grep -i' (in bash)
# aliased to `alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde' # aliased to `alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
# Return 0 if found, 1 otherwise # Return 0 if found, 1 otherwise
LANG=C type "$@" | LANG=C type "$@" |
@ -210,13 +211,37 @@ env_parallel() {
if perl -e 'exit grep { /^--session$/ } @ARGV' -- "$@"; then if perl -e 'exit grep { /^--session$/ } @ARGV' -- "$@"; then
true skip true skip
else else
PARALLEL_IGNORED_NAMES="`_names_of_ALIASES; # Insert ::: between each level of session
# so you can pop off the last ::: at --end-session
PARALLEL_IGNORED_NAMES="`echo \"$PARALLEL_IGNORED_NAMES\";
echo :::;
(_names_of_ALIASES;
_names_of_FUNCTIONS; _names_of_FUNCTIONS;
_names_of_VARIABLES`" _names_of_VARIABLES) | perl -ne '
BEGIN{
map { $ignored_vars{$_}++ }
split/\s+/, $ENV{PARALLEL_IGNORED_NAMES};
}
chomp;
for(split/\s+/) {
if(not $ignored_vars{$_}) {
print $_,\"\\n\";
}
}
'`"
export PARALLEL_IGNORED_NAMES export PARALLEL_IGNORED_NAMES
return 0 return 0
fi fi
if perl -e 'exit grep { /^--end.?session$/ } @ARGV' -- "$@"; then
true skip
else
# Pop off last ::: from PARALLEL_IGNORED_NAMES
PARALLEL_IGNORED_NAMES="`perl -e '
$ENV{PARALLEL_IGNORED_NAMES} =~ s/(.*):::.*?$/$1/s;
print $ENV{PARALLEL_IGNORED_NAMES}
'`"
return 0
fi
# Grep alias names # Grep alias names
_alias_NAMES="`_names_of_ALIASES | _remove_bad_NAMES | xargs echo`" _alias_NAMES="`_names_of_ALIASES | _remove_bad_NAMES | xargs echo`"
_list_alias_BODIES="_bodies_of_ALIASES $_alias_NAMES" _list_alias_BODIES="_bodies_of_ALIASES $_alias_NAMES"

View file

@ -232,7 +232,7 @@ B<find -exec> only works on files. Processing other input (such as
hosts or URLs) will require creating these inputs as files. B<find hosts or URLs) will require creating these inputs as files. B<find
-exec> has no support for running commands in parallel. -exec> has no support for running commands in parallel.
https://www.gnu.org/software/findutils/ https://www.gnu.org/software/findutils/ (Last checked: 2019-01)
=head2 DIFFERENCES BETWEEN make -j AND GNU Parallel =head2 DIFFERENCES BETWEEN make -j AND GNU Parallel
@ -247,7 +247,7 @@ by GNU B<parallel> does not depend on each other.
(Very early versions of GNU B<parallel> were coincidentally implemented (Very early versions of GNU B<parallel> were coincidentally implemented
using B<make -j>). using B<make -j>).
https://www.gnu.org/software/make/ https://www.gnu.org/software/make/ (Last checked: 2019-01)
=head2 DIFFERENCES BETWEEN ppss AND GNU Parallel =head2 DIFFERENCES BETWEEN ppss AND GNU Parallel
@ -429,7 +429,7 @@ cat /var/run/my_named_pipe | parallel &
echo unzip 1.zip >> /var/run/my_named_pipe; echo unzip 1.zip >> /var/run/my_named_pipe;
echo tar cf /backup/myhome.tar /home/me >> /var/run/my_named_pipe echo tar cf /backup/myhome.tar /home/me >> /var/run/my_named_pipe
http://www.maier-komor.de/xjobs.html http://www.maier-komor.de/xjobs.html (Last checked: 2019-01)
=head2 DIFFERENCES BETWEEN prll AND GNU Parallel =head2 DIFFERENCES BETWEEN prll AND GNU Parallel
@ -451,7 +451,7 @@ using GNU B<parallel>:
prll -s 'mogrify -flip $1' *.jpg prll -s 'mogrify -flip $1' *.jpg
parallel mogrify -flip ::: *.jpg parallel mogrify -flip ::: *.jpg
https://github.com/exzombie/prll https://github.com/exzombie/prll (Last checked: 2019-01)
=head2 DIFFERENCES BETWEEN dxargs AND GNU Parallel =head2 DIFFERENCES BETWEEN dxargs AND GNU Parallel
@ -462,7 +462,7 @@ B<dxargs> does not deal well with more simultaneous jobs than SSHD's
MaxStartups. B<dxargs> is only built for remote run jobs, but does not MaxStartups. B<dxargs> is only built for remote run jobs, but does not
support transferring of files. support transferring of files.
https://web.archive.org/web/20120518070250/http://www.semicomplete.com/blog/geekery/distributed-xargs.html https://web.archive.org/web/20120518070250/http://www.semicomplete.com/blog/geekery/distributed-xargs.html (Last checked: 2019-01)
=head2 DIFFERENCES BETWEEN mdm/middleman AND GNU Parallel =head2 DIFFERENCES BETWEEN mdm/middleman AND GNU Parallel
@ -477,7 +477,7 @@ ported to GNU B<parallel>:
cat files | parallel cmd cat files | parallel cmd
find dir -execdir sem cmd {} \; find dir -execdir sem cmd {} \;
https://github.com/cklin/mdm https://github.com/cklin/mdm (Last checked: 2019-01)
=head2 DIFFERENCES BETWEEN xapply AND GNU Parallel =head2 DIFFERENCES BETWEEN xapply AND GNU Parallel
@ -570,7 +570,7 @@ B</usr/joe>, enter:
apply 'ln %1 /usr/joe' * apply 'ln %1 /usr/joe' *
parallel ln {} /usr/joe ::: * parallel ln {} /usr/joe ::: *
https://www.ibm.com/support/knowledgecenter/en/ssw_aix_61/com.ibm.aix.cmds1/apply.htm https://www-01.ibm.com/support/knowledgecenter/ssw_aix_71/com.ibm.aix.cmds1/apply.htm (Last checked: 2019-01)
=head2 DIFFERENCES BETWEEN paexec AND GNU Parallel =head2 DIFFERENCES BETWEEN paexec AND GNU Parallel
@ -759,7 +759,7 @@ B<4> ladon "~/Music/*.wav" -- lame -V 2 FULLPATH DIRNAME/BASENAME.mp3
B<4> parallel lame -V 2 FULLPATH DIRNAME/BASENAME.mp3 ::: ~/Music/*.wav B<4> parallel lame -V 2 FULLPATH DIRNAME/BASENAME.mp3 ::: ~/Music/*.wav
https://github.com/danielgtaylor/ladon https://github.com/danielgtaylor/ladon (Last checked: 2019-01)
=head2 DIFFERENCES BETWEEN jobflow AND GNU Parallel =head2 DIFFERENCES BETWEEN jobflow AND GNU Parallel
@ -1407,6 +1407,8 @@ It can be emulated with GNU B<parallel> using this Bash function:
This works except for the B<--exclude> option. This works except for the B<--exclude> option.
(Last checked: 2017-11)
=head2 DIFFERENCES BETWEEN pyargs AND GNU Parallel =head2 DIFFERENCES BETWEEN pyargs AND GNU Parallel
@ -1471,7 +1473,7 @@ There is also no way of controlling how many jobs should be run in
parallel at a time - i.e. "number of jobslots". Instead all jobs are parallel at a time - i.e. "number of jobslots". Instead all jobs are
simply started in parallel. simply started in parallel.
https://github.com/kimmobrunfeldt/concurrently https://github.com/kimmobrunfeldt/concurrently (Last checked: 2019-01)
=head2 DIFFERENCES BETWEEN map(soveran) AND GNU Parallel =head2 DIFFERENCES BETWEEN map(soveran) AND GNU Parallel
@ -1487,7 +1489,7 @@ B<map> itself, the output also mixes:
seq 10 | map i 'echo start-$i && sleep 0.$i && echo end-$i &' seq 10 | map i 'echo start-$i && sleep 0.$i && echo end-$i &'
The major difference is that GNU B<parallel> is built for parallelization The major difference is that GNU B<parallel> is built for parallelization
and map is not. So GNU B<parallel> has lots of ways of dealing with the and B<map> is not. So GNU B<parallel> has lots of ways of dealing with the
issues that parallelization raises: issues that parallelization raises:
=over 4 =over 4
@ -1525,7 +1527,7 @@ Here are the 5 examples converted to GNU Parallel:
5$ printf "1\n1\n1\n" | parallel -j0 'sleep {} && say done' 5$ printf "1\n1\n1\n" | parallel -j0 'sleep {} && say done'
5$ parallel -j0 'sleep {} && say done' ::: 1 1 1 5$ parallel -j0 'sleep {} && say done' ::: 1 1 1
https://github.com/soveran/map https://github.com/soveran/map (Last checked: 2019-01)
=head2 DIFFERENCES BETWEEN loop AND GNU Parallel =head2 DIFFERENCES BETWEEN loop AND GNU Parallel

View file

@ -22,7 +22,8 @@ run_test() {
export TMPDIR=/tmp/"$base"-tmpdir export TMPDIR=/tmp/"$base"-tmpdir
mkdir -p "$TMPDIR" mkdir -p "$TMPDIR"
# Clean before. May be owned by other users # Clean before. May be owned by other users
sudo rm -f /tmp/*.{tmx,pac,arg,all,log,swp,loa,ssh,df,pip,tmb,chr,tms,par} sudo rm -f /tmp/*.{tmx,pac,arg,all,log,swp,loa,ssh,df,pip,tmb,chr,tms,par} ||
printf "%s\0" /tmp/*.par | sudo parallel -0 -X rm
# Force running once # Force running once
echo >> actual-results/"$base" echo >> actual-results/"$base"
if [ "$TRIES" = "3" ] ; then if [ "$TRIES" = "3" ] ; then

View file

@ -1707,7 +1707,7 @@ _EOF
par_bash_environment_too_big() { par_bash_environment_too_big() {
myscript=$(cat <<'_EOF' myscript=$(cat <<'_EOF'
echo 'bug #50815: env_parallel should warn if the environment is too big' echo 'bug #50815: env_parallel should warn if the environment is too big'
len_var=100+50-25-12+6-3+2 len_var=100+50-25-12+6-3+2-1
len_var_remote=100-50+25+12-6+3 len_var_remote=100-50+25+12-6+3
len_var_quote=100-50+25-12-6+3-2 len_var_quote=100-50+25-12-6+3-2
len_var_quote_remote=100-50-25+12+6-3 len_var_quote_remote=100-50-25+12+6-3
@ -2594,6 +2594,62 @@ par_ash_env_parallel_session() {
. `which env_parallel.ash` . `which env_parallel.ash`
echo '### Test env_parallel --session' echo '### Test env_parallel --session'
level0var=l0var
# Arrays and functions not supported
# level0arr=(level0 array)
# level0func() { echo l0func; }
alias level0alias='echo l0alias'
env_parallel --session
level1var=l1var
# Arrays and functions not supported
# level1arr=(level1 array)
# level1func() { echo l1func; }
alias level1alias='echo l1alias'
echo '### level0 should be hidden, level1 should be transferred'
env_parallel -Slo 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel -Slo 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel --session
level2var=l2var
# Arrays and functions not supported
# level2arr=(level2 array)
# level2func() { echo l2func; }
alias level2alias='echo l2alias'
echo '### level0+1 should be hidden, level2 should be transferred'
env_parallel -Slo 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel -Slo 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: fail
env_parallel 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: fail
env_parallel -Slo 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
env_parallel 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
env_parallel --endsession
echo '### level0 should be hidden, level1+2 should be transferred'
env_parallel -Slo 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel -Slo 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel -Slo 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
env_parallel 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
env_parallel --endsession
echo '### level0+1+2 should be transferred'
env_parallel -Slo 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: OK
env_parallel 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: OK
env_parallel -Slo 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel -Slo 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
env_parallel 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
alias aliasbefore='echo before' alias aliasbefore='echo before'
# Functions not supported # Functions not supported
# varbefore='before' # varbefore='before'
@ -2636,35 +2692,90 @@ _EOF
par_bash_env_parallel_session() { par_bash_env_parallel_session() {
myscript=$(cat <<'_EOF' myscript=$(cat <<'_EOF'
echo '### Test env_parallel --session' echo '### Test env_parallel --session / --end-session'
. `which env_parallel.bash` . `which env_parallel.bash`
alias aliasbefore='echo before' level0var=l0var
varbefore='before' level0arr=(level0 array)
funcbefore() { echo 'before' "$@"; } level0func() { echo l0func; }
arraybefore=(array before) alias level0alias='echo l0alias'
env_parallel --session
level1var=l1var
level1arr=(level1 array)
level1func() { echo l1func; }
alias level1alias='echo l1alias'
echo '### level0 should be hidden, level1 should be transferred'
env_parallel -Slo 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel -Slo 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel --session
level2var=l2var
level2arr=(level2 array)
level2func() { echo l2func; }
alias level2alias='echo l2alias'
echo '### level0+1 should be hidden, level2 should be transferred'
env_parallel -Slo 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel -Slo 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: fail
env_parallel 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: fail
env_parallel -Slo 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
env_parallel 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
env_parallel --endsession
echo '### level0 should be hidden, level1+2 should be transferred'
env_parallel -Slo 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel -Slo 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel -Slo 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
env_parallel 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
env_parallel --endsession
echo '### level0+1+2 should be transferred'
env_parallel -Slo 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: OK
env_parallel 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: OK
env_parallel -Slo 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel -Slo 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
env_parallel 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
alias aliasl0='echo l0'
varl0='l0'
funcl0() { echo 'l0' "$@"; }
arrayl0=(array l0)
env_parallel --session env_parallel --session
# stuff defined # stuff defined
env_parallel aliasbefore ::: must_fail env_parallel aliasl0 ::: must_fail
env_parallel -S lo aliasbefore ::: must_fail env_parallel -S lo aliasl0 ::: must_fail
env_parallel funcbefore ::: must_fail env_parallel funcl0 ::: must_fail
env_parallel -S lo funcbefore ::: must_fail env_parallel -S lo funcl0 ::: must_fail
env_parallel echo '$varbefore' ::: no_before env_parallel echo '$varl0' ::: no_before
env_parallel -S lo echo '$varbefore' ::: no_before env_parallel -S lo echo '$varl0' ::: no_before
env_parallel echo '${arraybefore[*]}' ::: no_before env_parallel echo '${arrayl0[*]}' ::: no_before
env_parallel -S lo echo '${arraybefore[*]}' ::: no_before env_parallel -S lo echo '${arrayl0[*]}' ::: no_before
alias aliasafter='echo after' alias aliasl1='echo l1'
varafter='after' varl1='l1'
funcafter() { echo 'after' "$@"; } funcl1() { echo 'l1' "$@"; }
arrayafter=(array after) arrayl1=(array l1)
env_parallel aliasafter ::: aliasafter_OK env_parallel aliasl1 ::: aliasl1_OK
env_parallel -S lo aliasafter ::: aliasafter_OK env_parallel -S lo aliasl1 ::: aliasl1_OK
env_parallel funcafter ::: funcafter_OK env_parallel funcl1 ::: funcl1_OK
env_parallel -S lo funcafter ::: funcafter_OK env_parallel -S lo funcl1 ::: funcl1_OK
env_parallel echo '$varafter' ::: varafter_OK env_parallel echo '$varl1' ::: varl1_OK
env_parallel -S lo echo '$varafter' ::: varafter_OK env_parallel -S lo echo '$varl1' ::: varl1_OK
env_parallel echo '${arrayafter[*]}' ::: arrayafter_OK env_parallel echo '${arrayl1[*]}' ::: arrayl1_OK
env_parallel -S lo echo '${arrayafter[*]}' ::: arrayafter_OK env_parallel -S lo echo '${arrayl1[*]}' ::: arrayl1_OK
unset PARALLEL_IGNORED_NAMES unset PARALLEL_IGNORED_NAMES
_EOF _EOF
) )
@ -2680,6 +2791,62 @@ par_dash_env_parallel_session() {
. `which env_parallel.dash` . `which env_parallel.dash`
echo '### Test env_parallel --session' echo '### Test env_parallel --session'
level0var=l0var
# Arrays and functions not supported
# level0arr=(level0 array)
# level0func() { echo l0func; }
alias level0alias='echo l0alias'
env_parallel --session
level1var=l1var
# Arrays and functions not supported
# level1arr=(level1 array)
# level1func() { echo l1func; }
alias level1alias='echo l1alias'
echo '### level0 should be hidden, level1 should be transferred'
env_parallel -Slo 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel -Slo 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel --session
level2var=l2var
# Arrays and functions not supported
# level2arr=(level2 array)
# level2func() { echo l2func; }
alias level2alias='echo l2alias'
echo '### level0+1 should be hidden, level2 should be transferred'
env_parallel -Slo 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel -Slo 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: fail
env_parallel 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: fail
env_parallel -Slo 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
env_parallel 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
env_parallel --endsession
echo '### level0 should be hidden, level1+2 should be transferred'
env_parallel -Slo 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel -Slo 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel -Slo 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
env_parallel 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
env_parallel --endsession
echo '### level0+1+2 should be transferred'
env_parallel -Slo 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: OK
env_parallel 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: OK
env_parallel -Slo 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel -Slo 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
env_parallel 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
alias aliasbefore='echo before' alias aliasbefore='echo before'
varbefore='before' varbefore='before'
# Functions not supported # Functions not supported
@ -2767,6 +2934,59 @@ par_ksh_env_parallel_session() {
. `which env_parallel.ksh` . `which env_parallel.ksh`
echo '### Test env_parallel --session' echo '### Test env_parallel --session'
level0var=l0var
level0arr=(level0 array)
level0func() { echo l0func; }
alias level0alias='echo l0alias'
env_parallel --session
level1var=l1var
level1arr=(level1 array)
level1func() { echo l1func; }
alias level1alias='echo l1alias'
echo '### level0 should be hidden, level1 should be transferred'
env_parallel -Slo 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel -Slo 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel --session
level2var=l2var
level2arr=(level2 array)
level2func() { echo l2func; }
alias level2alias='echo l2alias'
echo '### level0+1 should be hidden, level2 should be transferred'
env_parallel -Slo 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel -Slo 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: fail
env_parallel 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: fail
env_parallel -Slo 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
env_parallel 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
env_parallel --endsession
echo '### level0 should be hidden, level1+2 should be transferred'
env_parallel -Slo 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel -Slo 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel -Slo 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
env_parallel 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
env_parallel --endsession
echo '### level0+1+2 should be transferred'
env_parallel -Slo 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: OK
env_parallel 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: OK
env_parallel -Slo 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel -Slo 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
env_parallel 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
alias aliasbefore='echo before' alias aliasbefore='echo before'
varbefore='before' varbefore='before'
funcbefore() { echo 'before' "$@"; } funcbefore() { echo 'before' "$@"; }
@ -2804,6 +3024,59 @@ par_mksh_env_parallel_session() {
. `which env_parallel.mksh` . `which env_parallel.mksh`
echo '### Test env_parallel --session' echo '### Test env_parallel --session'
level0var=l0var
level0arr=(level0 array)
level0func() { echo l0func; }
alias level0alias='echo l0alias'
env_parallel --session
level1var=l1var
level1arr=(level1 array)
level1func() { echo l1func; }
alias level1alias='echo l1alias'
echo '### level0 should be hidden, level1 should be transferred'
env_parallel -Slo 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel -Slo 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel --session
level2var=l2var
level2arr=(level2 array)
level2func() { echo l2func; }
alias level2alias='echo l2alias'
echo '### level0+1 should be hidden, level2 should be transferred'
env_parallel -Slo 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel -Slo 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: fail
env_parallel 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: fail
env_parallel -Slo 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
env_parallel 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
env_parallel --endsession
echo '### level0 should be hidden, level1+2 should be transferred'
env_parallel -Slo 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel -Slo 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel -Slo 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
env_parallel 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
env_parallel --endsession
echo '### level0+1+2 should be transferred'
env_parallel -Slo 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: OK
env_parallel 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: OK
env_parallel -Slo 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel -Slo 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
env_parallel 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
alias aliasbefore='echo before' alias aliasbefore='echo before'
varbefore='before' varbefore='before'
funcbefore() { echo 'before' "$@"; } funcbefore() { echo 'before' "$@"; }
@ -2841,19 +3114,70 @@ par_sh_env_parallel_session() {
. `which env_parallel.sh` . `which env_parallel.sh`
echo '### Test env_parallel --session' echo '### Test env_parallel --session'
level0var=l0var
# level0arr=(level0 array)
level0func() { echo l0func; }
# alias level0alias='echo l0alias'
env_parallel --session
level1var=l1var
# level1arr=(level1 array)
level1func() { echo l1func; }
# alias level1alias='echo l1alias'
echo '### level0 should be hidden, level1 should be transferred'
env_parallel -Slo 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel -Slo 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel --session
level2var=l2var
# level2arr=(level2 array)
level2func() { echo l2func; }
# alias level2alias='echo l2alias'
echo '### level0+1 should be hidden, level2 should be transferred'
env_parallel -Slo 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel -Slo 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: fail
env_parallel 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: fail
env_parallel -Slo 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
env_parallel 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
env_parallel --endsession
echo '### level0 should be hidden, level1+2 should be transferred'
env_parallel -Slo 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel -Slo 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel -Slo 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
env_parallel 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
env_parallel --endsession
echo '### level0+1+2 should be transferred'
env_parallel -Slo 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: OK
env_parallel 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: OK
env_parallel -Slo 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel -Slo 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
env_parallel 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
alias aliasbefore='echo before' alias aliasbefore='echo before'
varbefore='before' varbefore='before'
# Functions not supported funcbefore() { echo 'before' "$@"; }
# funcbefore() { echo 'before' "$@"; }
# Arrays not supported # Arrays not supported
# arraybefore=(array before) # arraybefore=(array before)
env_parallel --session env_parallel --session
# stuff defined # stuff defined
env_parallel aliasbefore ::: must_fail env_parallel aliasbefore ::: must_fail
env_parallel -S lo aliasbefore ::: must_fail env_parallel -S lo aliasbefore ::: must_fail
# Functions not supported env_parallel funcbefore ::: must_fail
# env_parallel funcbefore ::: must_fail env_parallel -S lo funcbefore ::: must_fail
# env_parallel -S lo funcbefore ::: must_fail
env_parallel echo '$varbefore' ::: no_before env_parallel echo '$varbefore' ::: no_before
env_parallel -S lo echo '$varbefore' ::: no_before env_parallel -S lo echo '$varbefore' ::: no_before
# Arrays not supported # Arrays not supported
@ -2866,9 +3190,8 @@ par_sh_env_parallel_session() {
# arrayafter=(array after) # arrayafter=(array after)
env_parallel aliasafter ::: aliasafter_OK env_parallel aliasafter ::: aliasafter_OK
env_parallel -S lo aliasafter ::: aliasafter_OK env_parallel -S lo aliasafter ::: aliasafter_OK
# Functions not supported env_parallel funcafter ::: funcafter_OK
# env_parallel funcafter ::: funcafter_OK env_parallel -S lo funcafter ::: funcafter_OK
# env_parallel -S lo funcafter ::: funcafter_OK
env_parallel echo '$varafter' ::: varafter_OK env_parallel echo '$varafter' ::: varafter_OK
env_parallel -S lo echo '$varafter' ::: varafter_OK env_parallel -S lo echo '$varafter' ::: varafter_OK
# Arrays not supported # Arrays not supported
@ -2890,6 +3213,59 @@ par_zsh_env_parallel_session() {
eval "`cat <<"_EOS"; eval "`cat <<"_EOS";
echo '### Test env_parallel --session' echo '### Test env_parallel --session'
level0var=l0var
level0arr=(level0 array)
level0func() { echo l0func; }
alias level0alias='echo l0alias'
env_parallel --session
level1var=l1var
level1arr=(level1 array)
level1func() { echo l1func; }
alias level1alias='echo l1alias'
echo '### level0 should be hidden, level1 should be transferred'
env_parallel -Slo 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel -Slo 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel --session
level2var=l2var
level2arr=(level2 array)
level2func() { echo l2func; }
alias level2alias='echo l2alias'
echo '### level0+1 should be hidden, level2 should be transferred'
env_parallel -Slo 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel -Slo 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: fail
env_parallel 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: fail
env_parallel -Slo 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
env_parallel 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
env_parallel --endsession
echo '### level0 should be hidden, level1+2 should be transferred'
env_parallel -Slo 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: fail
env_parallel -Slo 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel -Slo 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
env_parallel 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
env_parallel --endsession
echo '### level0+1+2 should be transferred'
env_parallel -Slo 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: OK
env_parallel 'echo $level0var; level0func; level0alias; echo ${level0arr[*]}' ::: OK
env_parallel -Slo 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel 'echo $level1var; level1func; level1alias; echo ${level1arr[*]}' ::: OK
env_parallel -Slo 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
env_parallel 'echo $level2var; level2func; level2alias; echo ${level2arr[*]}' ::: OK
alias aliasbefore='echo before' alias aliasbefore='echo before'
varbefore='before' varbefore='before'
funcbefore() { echo 'before' "$@"; } funcbefore() { echo 'before' "$@"; }
@ -2932,7 +3308,8 @@ export -f $(compgen -A function | grep par_)
compgen -A function | grep par_ | LC_ALL=C sort -r | compgen -A function | grep par_ | LC_ALL=C sort -r |
# parallel --joblog /tmp/jl-`basename $0` --delay $D -j$P --tag -k '{} 2>&1' # parallel --joblog /tmp/jl-`basename $0` --delay $D -j$P --tag -k '{} 2>&1'
parallel --joblog /tmp/jl-`basename $0` -j200% --retries 2 --tag -k '{} 2>&1' | parallel --joblog /tmp/jl-`basename $0` -j200% --retries 2 --tag -k '{} 2>&1' |
perl -pe 's/line \d\d\d:/line XXX:/; perl -pe 's/line \d?\d\d:/line XXX:/g;
s/\d+ >= \d+/XXX >= XXX/; s/\d+ >= \d+/XXX >= XXX/;
s/sh:? \d?\d\d:/sh: XXX:/; s/sh:? \d?\d\d:/sh: XXX:/;
s/:\d?\d\d:/:XXX:/;
s/sh\[\d+\]/sh[XXX]/;' s/sh\[\d+\]/sh[XXX]/;'

View file

@ -153,7 +153,7 @@ par_zsh_environment_too_big OK_bigfunc_remote
par_zsh_environment_too_big OK_bigfunc_quote par_zsh_environment_too_big OK_bigfunc_quote
par_zsh_environment_too_big OK_bigfunc_quote_remote par_zsh_environment_too_big OK_bigfunc_quote_remote
par_zsh_environment_too_big Rest should fail par_zsh_environment_too_big Rest should fail
par_zsh_environment_too_big _which_PAR:12: argument list too long: perl par_zsh_environment_too_big _which_PAR:XXX: argument list too long: perl
par_zsh_environment_too_big env_parallel: Error: Your environment is too big. par_zsh_environment_too_big env_parallel: Error: Your environment is too big.
par_zsh_environment_too_big env_parallel: Error: You can try 3 different approaches: par_zsh_environment_too_big env_parallel: Error: You can try 3 different approaches:
par_zsh_environment_too_big env_parallel: Error: 1. Run 'env_parallel --session' before you set par_zsh_environment_too_big env_parallel: Error: 1. Run 'env_parallel --session' before you set
@ -163,7 +163,7 @@ par_zsh_environment_too_big env_parallel: Error: 3. Try running this in a clean
par_zsh_environment_too_big env_parallel: Error: env_parallel --record-env par_zsh_environment_too_big env_parallel: Error: env_parallel --record-env
par_zsh_environment_too_big env_parallel: Error: And then use '--env _' par_zsh_environment_too_big env_parallel: Error: And then use '--env _'
par_zsh_environment_too_big env_parallel: Error: For details see: man env_parallel par_zsh_environment_too_big env_parallel: Error: For details see: man env_parallel
par_zsh_environment_too_big _which_PAR:12: argument list too long: perl par_zsh_environment_too_big _which_PAR:XXX: argument list too long: perl
par_zsh_environment_too_big env_parallel: Error: Your environment is too big. par_zsh_environment_too_big env_parallel: Error: Your environment is too big.
par_zsh_environment_too_big env_parallel: Error: You can try 3 different approaches: par_zsh_environment_too_big env_parallel: Error: You can try 3 different approaches:
par_zsh_environment_too_big env_parallel: Error: 1. Run 'env_parallel --session' before you set par_zsh_environment_too_big env_parallel: Error: 1. Run 'env_parallel --session' before you set
@ -173,7 +173,7 @@ par_zsh_environment_too_big env_parallel: Error: 3. Try running this in a clean
par_zsh_environment_too_big env_parallel: Error: env_parallel --record-env par_zsh_environment_too_big env_parallel: Error: env_parallel --record-env
par_zsh_environment_too_big env_parallel: Error: And then use '--env _' par_zsh_environment_too_big env_parallel: Error: And then use '--env _'
par_zsh_environment_too_big env_parallel: Error: For details see: man env_parallel par_zsh_environment_too_big env_parallel: Error: For details see: man env_parallel
par_zsh_environment_too_big _which_PAR:12: argument list too long: perl par_zsh_environment_too_big _which_PAR:XXX: argument list too long: perl
par_zsh_environment_too_big env_parallel: Error: Your environment is too big. par_zsh_environment_too_big env_parallel: Error: Your environment is too big.
par_zsh_environment_too_big env_parallel: Error: You can try 3 different approaches: par_zsh_environment_too_big env_parallel: Error: You can try 3 different approaches:
par_zsh_environment_too_big env_parallel: Error: 1. Run 'env_parallel --session' before you set par_zsh_environment_too_big env_parallel: Error: 1. Run 'env_parallel --session' before you set
@ -183,7 +183,7 @@ par_zsh_environment_too_big env_parallel: Error: 3. Try running this in a clean
par_zsh_environment_too_big env_parallel: Error: env_parallel --record-env par_zsh_environment_too_big env_parallel: Error: env_parallel --record-env
par_zsh_environment_too_big env_parallel: Error: And then use '--env _' par_zsh_environment_too_big env_parallel: Error: And then use '--env _'
par_zsh_environment_too_big env_parallel: Error: For details see: man env_parallel par_zsh_environment_too_big env_parallel: Error: For details see: man env_parallel
par_zsh_environment_too_big _which_PAR:12: argument list too long: perl par_zsh_environment_too_big _which_PAR:XXX: argument list too long: perl
par_zsh_environment_too_big env_parallel: Error: Your environment is too big. par_zsh_environment_too_big env_parallel: Error: Your environment is too big.
par_zsh_environment_too_big env_parallel: Error: You can try 3 different approaches: par_zsh_environment_too_big env_parallel: Error: You can try 3 different approaches:
par_zsh_environment_too_big env_parallel: Error: 1. Run 'env_parallel --session' before you set par_zsh_environment_too_big env_parallel: Error: 1. Run 'env_parallel --session' before you set
@ -193,7 +193,7 @@ par_zsh_environment_too_big env_parallel: Error: 3. Try running this in a clean
par_zsh_environment_too_big env_parallel: Error: env_parallel --record-env par_zsh_environment_too_big env_parallel: Error: env_parallel --record-env
par_zsh_environment_too_big env_parallel: Error: And then use '--env _' par_zsh_environment_too_big env_parallel: Error: And then use '--env _'
par_zsh_environment_too_big env_parallel: Error: For details see: man env_parallel par_zsh_environment_too_big env_parallel: Error: For details see: man env_parallel
par_zsh_environment_too_big _which_PAR:12: argument list too long: perl par_zsh_environment_too_big _which_PAR:XXX: argument list too long: perl
par_zsh_environment_too_big env_parallel: Error: Your environment is too big. par_zsh_environment_too_big env_parallel: Error: Your environment is too big.
par_zsh_environment_too_big env_parallel: Error: You can try 3 different approaches: par_zsh_environment_too_big env_parallel: Error: You can try 3 different approaches:
par_zsh_environment_too_big env_parallel: Error: 1. Run 'env_parallel --session' before you set par_zsh_environment_too_big env_parallel: Error: 1. Run 'env_parallel --session' before you set
@ -203,7 +203,7 @@ par_zsh_environment_too_big env_parallel: Error: 3. Try running this in a clean
par_zsh_environment_too_big env_parallel: Error: env_parallel --record-env par_zsh_environment_too_big env_parallel: Error: env_parallel --record-env
par_zsh_environment_too_big env_parallel: Error: And then use '--env _' par_zsh_environment_too_big env_parallel: Error: And then use '--env _'
par_zsh_environment_too_big env_parallel: Error: For details see: man env_parallel par_zsh_environment_too_big env_parallel: Error: For details see: man env_parallel
par_zsh_environment_too_big _which_PAR:12: argument list too long: perl par_zsh_environment_too_big _which_PAR:XXX: argument list too long: perl
par_zsh_environment_too_big env_parallel: Error: Your environment is too big. par_zsh_environment_too_big env_parallel: Error: Your environment is too big.
par_zsh_environment_too_big env_parallel: Error: You can try 3 different approaches: par_zsh_environment_too_big env_parallel: Error: You can try 3 different approaches:
par_zsh_environment_too_big env_parallel: Error: 1. Run 'env_parallel --session' before you set par_zsh_environment_too_big env_parallel: Error: 1. Run 'env_parallel --session' before you set
@ -213,7 +213,7 @@ par_zsh_environment_too_big env_parallel: Error: 3. Try running this in a clean
par_zsh_environment_too_big env_parallel: Error: env_parallel --record-env par_zsh_environment_too_big env_parallel: Error: env_parallel --record-env
par_zsh_environment_too_big env_parallel: Error: And then use '--env _' par_zsh_environment_too_big env_parallel: Error: And then use '--env _'
par_zsh_environment_too_big env_parallel: Error: For details see: man env_parallel par_zsh_environment_too_big env_parallel: Error: For details see: man env_parallel
par_zsh_environment_too_big _which_PAR:12: argument list too long: perl par_zsh_environment_too_big _which_PAR:XXX: argument list too long: perl
par_zsh_environment_too_big env_parallel: Error: Your environment is too big. par_zsh_environment_too_big env_parallel: Error: Your environment is too big.
par_zsh_environment_too_big env_parallel: Error: You can try 3 different approaches: par_zsh_environment_too_big env_parallel: Error: You can try 3 different approaches:
par_zsh_environment_too_big env_parallel: Error: 1. Run 'env_parallel --session' before you set par_zsh_environment_too_big env_parallel: Error: 1. Run 'env_parallel --session' before you set
@ -223,7 +223,7 @@ par_zsh_environment_too_big env_parallel: Error: 3. Try running this in a clean
par_zsh_environment_too_big env_parallel: Error: env_parallel --record-env par_zsh_environment_too_big env_parallel: Error: env_parallel --record-env
par_zsh_environment_too_big env_parallel: Error: And then use '--env _' par_zsh_environment_too_big env_parallel: Error: And then use '--env _'
par_zsh_environment_too_big env_parallel: Error: For details see: man env_parallel par_zsh_environment_too_big env_parallel: Error: For details see: man env_parallel
par_zsh_environment_too_big _which_PAR:12: argument list too long: perl par_zsh_environment_too_big _which_PAR:XXX: argument list too long: perl
par_zsh_environment_too_big env_parallel: Error: Your environment is too big. par_zsh_environment_too_big env_parallel: Error: Your environment is too big.
par_zsh_environment_too_big env_parallel: Error: You can try 3 different approaches: par_zsh_environment_too_big env_parallel: Error: You can try 3 different approaches:
par_zsh_environment_too_big env_parallel: Error: 1. Run 'env_parallel --session' before you set par_zsh_environment_too_big env_parallel: Error: 1. Run 'env_parallel --session' before you set
@ -234,10 +234,102 @@ par_zsh_environment_too_big env_parallel: Error: env_parallel --record-env
par_zsh_environment_too_big env_parallel: Error: And then use '--env _' par_zsh_environment_too_big env_parallel: Error: And then use '--env _'
par_zsh_environment_too_big env_parallel: Error: For details see: man env_parallel par_zsh_environment_too_big env_parallel: Error: For details see: man env_parallel
par_zsh_env_parallel_session ### Test env_parallel --session par_zsh_env_parallel_session ### Test env_parallel --session
par_zsh_env_parallel_session (eval):1: command not found: aliasbefore par_zsh_env_parallel_session ### level0 should be hidden, level1 should be transferred
par_zsh_env_parallel_session (eval):1: command not found: aliasbefore par_zsh_env_parallel_session
par_zsh_env_parallel_session (eval):1: command not found: funcbefore par_zsh_env_parallel_session fail
par_zsh_env_parallel_session (eval):1: command not found: funcbefore par_zsh_env_parallel_session (eval):1: command not found: level0func
par_zsh_env_parallel_session (eval):1: command not found: level0alias
par_zsh_env_parallel_session
par_zsh_env_parallel_session fail
par_zsh_env_parallel_session (eval):1: command not found: level0func
par_zsh_env_parallel_session (eval):1: command not found: level0alias
par_zsh_env_parallel_session l1var
par_zsh_env_parallel_session l1func
par_zsh_env_parallel_session l1alias
par_zsh_env_parallel_session level1 array OK
par_zsh_env_parallel_session l1var
par_zsh_env_parallel_session l1func
par_zsh_env_parallel_session l1alias
par_zsh_env_parallel_session level1 array OK
par_zsh_env_parallel_session ### level0+1 should be hidden, level2 should be transferred
par_zsh_env_parallel_session
par_zsh_env_parallel_session fail
par_zsh_env_parallel_session (eval):1: command not found: level0func
par_zsh_env_parallel_session (eval):1: command not found: level0alias
par_zsh_env_parallel_session
par_zsh_env_parallel_session fail
par_zsh_env_parallel_session (eval):1: command not found: level0func
par_zsh_env_parallel_session (eval):1: command not found: level0alias
par_zsh_env_parallel_session
par_zsh_env_parallel_session fail
par_zsh_env_parallel_session (eval):1: command not found: level1func
par_zsh_env_parallel_session (eval):1: command not found: level1alias
par_zsh_env_parallel_session
par_zsh_env_parallel_session fail
par_zsh_env_parallel_session (eval):1: command not found: level1func
par_zsh_env_parallel_session (eval):1: command not found: level1alias
par_zsh_env_parallel_session l2var
par_zsh_env_parallel_session l2func
par_zsh_env_parallel_session l2alias
par_zsh_env_parallel_session level2 array OK
par_zsh_env_parallel_session l2var
par_zsh_env_parallel_session l2func
par_zsh_env_parallel_session l2alias
par_zsh_env_parallel_session level2 array OK
par_zsh_env_parallel_session ### level0 should be hidden, level1+2 should be transferred
par_zsh_env_parallel_session
par_zsh_env_parallel_session fail
par_zsh_env_parallel_session (eval):1: command not found: level0func
par_zsh_env_parallel_session (eval):1: command not found: level0alias
par_zsh_env_parallel_session
par_zsh_env_parallel_session fail
par_zsh_env_parallel_session (eval):1: command not found: level0func
par_zsh_env_parallel_session (eval):1: command not found: level0alias
par_zsh_env_parallel_session l1var
par_zsh_env_parallel_session l1func
par_zsh_env_parallel_session l1alias
par_zsh_env_parallel_session level1 array OK
par_zsh_env_parallel_session l1var
par_zsh_env_parallel_session l1func
par_zsh_env_parallel_session l1alias
par_zsh_env_parallel_session level1 array OK
par_zsh_env_parallel_session l2var
par_zsh_env_parallel_session l2func
par_zsh_env_parallel_session l2alias
par_zsh_env_parallel_session level2 array OK
par_zsh_env_parallel_session l2var
par_zsh_env_parallel_session l2func
par_zsh_env_parallel_session l2alias
par_zsh_env_parallel_session level2 array OK
par_zsh_env_parallel_session ### level0+1+2 should be transferred
par_zsh_env_parallel_session l0var
par_zsh_env_parallel_session l0func
par_zsh_env_parallel_session l0alias
par_zsh_env_parallel_session level0 array OK
par_zsh_env_parallel_session l0var
par_zsh_env_parallel_session l0func
par_zsh_env_parallel_session l0alias
par_zsh_env_parallel_session level0 array OK
par_zsh_env_parallel_session l1var
par_zsh_env_parallel_session l1func
par_zsh_env_parallel_session l1alias
par_zsh_env_parallel_session level1 array OK
par_zsh_env_parallel_session l1var
par_zsh_env_parallel_session l1func
par_zsh_env_parallel_session l1alias
par_zsh_env_parallel_session level1 array OK
par_zsh_env_parallel_session l2var
par_zsh_env_parallel_session l2func
par_zsh_env_parallel_session l2alias
par_zsh_env_parallel_session level2 array OK
par_zsh_env_parallel_session l2var
par_zsh_env_parallel_session l2func
par_zsh_env_parallel_session l2alias
par_zsh_env_parallel_session level2 array OK
par_zsh_env_parallel_session zsh:1: command not found: aliasbefore
par_zsh_env_parallel_session zsh:1: command not found: aliasbefore
par_zsh_env_parallel_session zsh:1: command not found: funcbefore
par_zsh_env_parallel_session zsh:1: command not found: funcbefore
par_zsh_env_parallel_session no_before par_zsh_env_parallel_session no_before
par_zsh_env_parallel_session no_before par_zsh_env_parallel_session no_before
par_zsh_env_parallel_session no_before par_zsh_env_parallel_session no_before
@ -516,12 +608,108 @@ par_sh_environment_too_big fail_bigfunc_remote-not-supported
par_sh_environment_too_big fail_bigfunc_quote-not-supported par_sh_environment_too_big fail_bigfunc_quote-not-supported
par_sh_environment_too_big fail_bigfunc_quote_remote-not-supported par_sh_environment_too_big fail_bigfunc_quote_remote-not-supported
par_sh_env_parallel_session ### Test env_parallel --session par_sh_env_parallel_session ### Test env_parallel --session
par_sh_env_parallel_session /bin/sh: XXX: aliasbefore: not found par_sh_env_parallel_session ### level0 should be hidden, level1 should be transferred
par_sh_env_parallel_session /bin/sh: XXX: aliasbefore: not found par_sh_env_parallel_session
par_sh_env_parallel_session /bin/sh: XXX: level0func: not found
par_sh_env_parallel_session /bin/sh: XXX: level0alias: not found
par_sh_env_parallel_session /bin/sh: XXX: Bad substitution
par_sh_env_parallel_session
par_sh_env_parallel_session /bin/sh: XXX: level0func: not found
par_sh_env_parallel_session /bin/sh: XXX: level0alias: not found
par_sh_env_parallel_session /bin/sh: XXX: Bad substitution
par_sh_env_parallel_session l1var
par_sh_env_parallel_session /bin/sh: XXX: level1func: not found
par_sh_env_parallel_session /bin/sh: XXX: level1alias: not found
par_sh_env_parallel_session /bin/sh: XXX: Bad substitution
par_sh_env_parallel_session l1var
par_sh_env_parallel_session /bin/sh: XXX: level1func: not found
par_sh_env_parallel_session /bin/sh: XXX: level1alias: not found
par_sh_env_parallel_session /bin/sh: XXX: Bad substitution
par_sh_env_parallel_session ### level0+1 should be hidden, level2 should be transferred
par_sh_env_parallel_session
par_sh_env_parallel_session /bin/sh: 2: level0func: not found
par_sh_env_parallel_session /bin/sh: 2: level0alias: not found
par_sh_env_parallel_session /bin/sh: 2: Bad substitution
par_sh_env_parallel_session
par_sh_env_parallel_session /bin/sh: 2: level0func: not found
par_sh_env_parallel_session /bin/sh: 2: level0alias: not found
par_sh_env_parallel_session /bin/sh: 2: Bad substitution
par_sh_env_parallel_session
par_sh_env_parallel_session /bin/sh: 2: level1func: not found
par_sh_env_parallel_session /bin/sh: 2: level1alias: not found
par_sh_env_parallel_session /bin/sh: 2: Bad substitution
par_sh_env_parallel_session
par_sh_env_parallel_session /bin/sh: 2: level1func: not found
par_sh_env_parallel_session /bin/sh: 2: level1alias: not found
par_sh_env_parallel_session /bin/sh: 2: Bad substitution
par_sh_env_parallel_session l2var
par_sh_env_parallel_session /bin/sh: 2: level2func: not found
par_sh_env_parallel_session /bin/sh: 2: level2alias: not found
par_sh_env_parallel_session /bin/sh: 2: Bad substitution
par_sh_env_parallel_session l2var
par_sh_env_parallel_session /bin/sh: 2: level2func: not found
par_sh_env_parallel_session /bin/sh: 2: level2alias: not found
par_sh_env_parallel_session /bin/sh: 2: Bad substitution
par_sh_env_parallel_session ### level0 should be hidden, level1+2 should be transferred
par_sh_env_parallel_session
par_sh_env_parallel_session /bin/sh: XXX: level0func: not found
par_sh_env_parallel_session /bin/sh: XXX: level0alias: not found
par_sh_env_parallel_session /bin/sh: XXX: Bad substitution
par_sh_env_parallel_session
par_sh_env_parallel_session /bin/sh: XXX: level0func: not found
par_sh_env_parallel_session /bin/sh: XXX: level0alias: not found
par_sh_env_parallel_session /bin/sh: XXX: Bad substitution
par_sh_env_parallel_session l1var
par_sh_env_parallel_session /bin/sh: XXX: level1func: not found
par_sh_env_parallel_session /bin/sh: XXX: level1alias: not found
par_sh_env_parallel_session /bin/sh: XXX: Bad substitution
par_sh_env_parallel_session l1var
par_sh_env_parallel_session /bin/sh: XXX: level1func: not found
par_sh_env_parallel_session /bin/sh: XXX: level1alias: not found
par_sh_env_parallel_session /bin/sh: XXX: Bad substitution
par_sh_env_parallel_session l2var
par_sh_env_parallel_session /bin/sh: XXX: level2func: not found
par_sh_env_parallel_session /bin/sh: XXX: level2alias: not found
par_sh_env_parallel_session /bin/sh: XXX: Bad substitution
par_sh_env_parallel_session l2var
par_sh_env_parallel_session /bin/sh: XXX: level2func: not found
par_sh_env_parallel_session /bin/sh: XXX: level2alias: not found
par_sh_env_parallel_session /bin/sh: XXX: Bad substitution
par_sh_env_parallel_session ### level0+1+2 should be transferred
par_sh_env_parallel_session l0var
par_sh_env_parallel_session /bin/sh: XXX: level0func: not found
par_sh_env_parallel_session /bin/sh: XXX: level0alias: not found
par_sh_env_parallel_session /bin/sh: XXX: Bad substitution
par_sh_env_parallel_session l0var
par_sh_env_parallel_session /bin/sh: XXX: level0func: not found
par_sh_env_parallel_session /bin/sh: XXX: level0alias: not found
par_sh_env_parallel_session /bin/sh: XXX: Bad substitution
par_sh_env_parallel_session l1var
par_sh_env_parallel_session /bin/sh: XXX: level1func: not found
par_sh_env_parallel_session /bin/sh: XXX: level1alias: not found
par_sh_env_parallel_session /bin/sh: XXX: Bad substitution
par_sh_env_parallel_session l1var
par_sh_env_parallel_session /bin/sh: XXX: level1func: not found
par_sh_env_parallel_session /bin/sh: XXX: level1alias: not found
par_sh_env_parallel_session /bin/sh: XXX: Bad substitution
par_sh_env_parallel_session l2var
par_sh_env_parallel_session /bin/sh: XXX: level2func: not found
par_sh_env_parallel_session /bin/sh: XXX: level2alias: not found
par_sh_env_parallel_session /bin/sh: XXX: Bad substitution
par_sh_env_parallel_session l2var
par_sh_env_parallel_session /bin/sh: XXX: level2func: not found
par_sh_env_parallel_session /bin/sh: XXX: level2alias: not found
par_sh_env_parallel_session /bin/sh: XXX: Bad substitution
par_sh_env_parallel_session /bin/sh: 1: aliasbefore: not found
par_sh_env_parallel_session /bin/sh: 1: aliasbefore: not found
par_sh_env_parallel_session /bin/sh: 1: funcbefore: not found
par_sh_env_parallel_session /bin/sh: 1: funcbefore: not found
par_sh_env_parallel_session no_before par_sh_env_parallel_session no_before
par_sh_env_parallel_session no_before par_sh_env_parallel_session no_before
par_sh_env_parallel_session after aliasafter_OK par_sh_env_parallel_session after aliasafter_OK
par_sh_env_parallel_session after aliasafter_OK par_sh_env_parallel_session after aliasafter_OK
par_sh_env_parallel_session /bin/sh: 3: funcafter: not found
par_sh_env_parallel_session /bin/sh: 3: funcafter: not found
par_sh_env_parallel_session after varafter_OK par_sh_env_parallel_session after varafter_OK
par_sh_env_parallel_session after varafter_OK par_sh_env_parallel_session after varafter_OK
par_sh_env_parallel OK par_sh_env_parallel OK
@ -743,6 +931,98 @@ par_mksh_environment_too_big env_parallel: Error: And then use '--env _'
par_mksh_environment_too_big env_parallel: Error: For details see: man env_parallel par_mksh_environment_too_big env_parallel: Error: For details see: man env_parallel
par_mksh_environment_too_big parallel: Error: Command line too long (XXX >= XXX) at input 0: fail_bigfunc_quote_remote par_mksh_environment_too_big parallel: Error: Command line too long (XXX >= XXX) at input 0: fail_bigfunc_quote_remote
par_mksh_env_parallel_session ### Test env_parallel --session par_mksh_env_parallel_session ### Test env_parallel --session
par_mksh_env_parallel_session ### level0 should be hidden, level1 should be transferred
par_mksh_env_parallel_session
par_mksh_env_parallel_session fail
par_mksh_env_parallel_session /bin/mksh: level0func: not found
par_mksh_env_parallel_session /bin/mksh: level0alias: not found
par_mksh_env_parallel_session
par_mksh_env_parallel_session fail
par_mksh_env_parallel_session /bin/mksh: level0func: not found
par_mksh_env_parallel_session /bin/mksh: level0alias: not found
par_mksh_env_parallel_session l1var
par_mksh_env_parallel_session l1func
par_mksh_env_parallel_session l1alias
par_mksh_env_parallel_session level1 array OK
par_mksh_env_parallel_session l1var
par_mksh_env_parallel_session l1func
par_mksh_env_parallel_session l1alias
par_mksh_env_parallel_session level1 array OK
par_mksh_env_parallel_session ### level0+1 should be hidden, level2 should be transferred
par_mksh_env_parallel_session
par_mksh_env_parallel_session fail
par_mksh_env_parallel_session /bin/mksh: level0func: not found
par_mksh_env_parallel_session /bin/mksh: level0alias: not found
par_mksh_env_parallel_session
par_mksh_env_parallel_session fail
par_mksh_env_parallel_session /bin/mksh: level0func: not found
par_mksh_env_parallel_session /bin/mksh: level0alias: not found
par_mksh_env_parallel_session
par_mksh_env_parallel_session fail
par_mksh_env_parallel_session /bin/mksh: level1func: not found
par_mksh_env_parallel_session /bin/mksh: level1alias: not found
par_mksh_env_parallel_session
par_mksh_env_parallel_session fail
par_mksh_env_parallel_session /bin/mksh: level1func: not found
par_mksh_env_parallel_session /bin/mksh: level1alias: not found
par_mksh_env_parallel_session l2var
par_mksh_env_parallel_session l2func
par_mksh_env_parallel_session l2alias
par_mksh_env_parallel_session level2 array OK
par_mksh_env_parallel_session l2var
par_mksh_env_parallel_session l2func
par_mksh_env_parallel_session l2alias
par_mksh_env_parallel_session level2 array OK
par_mksh_env_parallel_session ### level0 should be hidden, level1+2 should be transferred
par_mksh_env_parallel_session
par_mksh_env_parallel_session fail
par_mksh_env_parallel_session /bin/mksh: level0func: not found
par_mksh_env_parallel_session /bin/mksh: level0alias: not found
par_mksh_env_parallel_session
par_mksh_env_parallel_session fail
par_mksh_env_parallel_session /bin/mksh: level0func: not found
par_mksh_env_parallel_session /bin/mksh: level0alias: not found
par_mksh_env_parallel_session l1var
par_mksh_env_parallel_session l1func
par_mksh_env_parallel_session l1alias
par_mksh_env_parallel_session level1 array OK
par_mksh_env_parallel_session l1var
par_mksh_env_parallel_session l1func
par_mksh_env_parallel_session l1alias
par_mksh_env_parallel_session level1 array OK
par_mksh_env_parallel_session l2var
par_mksh_env_parallel_session l2func
par_mksh_env_parallel_session l2alias
par_mksh_env_parallel_session level2 array OK
par_mksh_env_parallel_session l2var
par_mksh_env_parallel_session l2func
par_mksh_env_parallel_session l2alias
par_mksh_env_parallel_session level2 array OK
par_mksh_env_parallel_session ### level0+1+2 should be transferred
par_mksh_env_parallel_session l0var
par_mksh_env_parallel_session l0func
par_mksh_env_parallel_session l0alias
par_mksh_env_parallel_session level0 array OK
par_mksh_env_parallel_session l0var
par_mksh_env_parallel_session l0func
par_mksh_env_parallel_session l0alias
par_mksh_env_parallel_session level0 array OK
par_mksh_env_parallel_session l1var
par_mksh_env_parallel_session l1func
par_mksh_env_parallel_session l1alias
par_mksh_env_parallel_session level1 array OK
par_mksh_env_parallel_session l1var
par_mksh_env_parallel_session l1func
par_mksh_env_parallel_session l1alias
par_mksh_env_parallel_session level1 array OK
par_mksh_env_parallel_session l2var
par_mksh_env_parallel_session l2func
par_mksh_env_parallel_session l2alias
par_mksh_env_parallel_session level2 array OK
par_mksh_env_parallel_session l2var
par_mksh_env_parallel_session l2func
par_mksh_env_parallel_session l2alias
par_mksh_env_parallel_session level2 array OK
par_mksh_env_parallel_session /bin/mksh: aliasbefore: not found par_mksh_env_parallel_session /bin/mksh: aliasbefore: not found
par_mksh_env_parallel_session /bin/mksh: aliasbefore: not found par_mksh_env_parallel_session /bin/mksh: aliasbefore: not found
par_mksh_env_parallel_session /bin/mksh: funcbefore: not found par_mksh_env_parallel_session /bin/mksh: funcbefore: not found
@ -916,9 +1196,9 @@ par_ksh_man work,
par_ksh_man too par_ksh_man too
par_ksh_man This may never work par_ksh_man This may never work
par_ksh_man https://unix.stackexchange.com/questions/457031/extract-full-function-definitions par_ksh_man https://unix.stackexchange.com/questions/457031/extract-full-function-definitions
par_ksh_man /usr/bin/ksh: line 21: syntax error at line XXX: `{' unmatched par_ksh_man /usr/bin/ksh: line XXX: syntax error at line XXX: `{' unmatched
par_ksh_man /usr/bin/ksh: line 21: syntax error at line XXX: `{' unmatched par_ksh_man /usr/bin/ksh: line XXX: syntax error at line XXX: `{' unmatched
par_ksh_man /usr/bin/ksh: line 21: syntax error at line XXX: `{' unmatched par_ksh_man /usr/bin/ksh: line XXX: syntax error at line XXX: `{' unmatched
par_ksh_man exit value 2 should be 2 par_ksh_man exit value 2 should be 2
par_ksh_man Unknown option: no-such-option par_ksh_man Unknown option: no-such-option
par_ksh_man exit value 255 should be 255 par_ksh_man exit value 255 should be 255
@ -1003,10 +1283,102 @@ par_ksh_environment_too_big env_parallel: Error: env_parallel --record-env
par_ksh_environment_too_big env_parallel: Error: And then use '--env _' par_ksh_environment_too_big env_parallel: Error: And then use '--env _'
par_ksh_environment_too_big env_parallel: Error: For details see: man env_parallel par_ksh_environment_too_big env_parallel: Error: For details see: man env_parallel
par_ksh_env_parallel_session ### Test env_parallel --session par_ksh_env_parallel_session ### Test env_parallel --session
par_ksh_env_parallel_session /usr/bin/ksh: line 4: aliasbefore: not found par_ksh_env_parallel_session ### level0 should be hidden, level1 should be transferred
par_ksh_env_parallel_session /usr/bin/ksh: line 4: aliasbefore: not found par_ksh_env_parallel_session
par_ksh_env_parallel_session /usr/bin/ksh: line 4: funcbefore: not found par_ksh_env_parallel_session fail
par_ksh_env_parallel_session /usr/bin/ksh: line 4: funcbefore: not found par_ksh_env_parallel_session /usr/bin/ksh[XXX]: level0func: not found [No such file or directory]
par_ksh_env_parallel_session /usr/bin/ksh[XXX]: level0alias: not found [No such file or directory]
par_ksh_env_parallel_session
par_ksh_env_parallel_session fail
par_ksh_env_parallel_session /usr/bin/ksh[XXX]: level0func: not found [No such file or directory]
par_ksh_env_parallel_session /usr/bin/ksh[XXX]: level0alias: not found [No such file or directory]
par_ksh_env_parallel_session l1var
par_ksh_env_parallel_session l1func
par_ksh_env_parallel_session l1alias
par_ksh_env_parallel_session level1 array OK
par_ksh_env_parallel_session l1var
par_ksh_env_parallel_session l1func
par_ksh_env_parallel_session l1alias
par_ksh_env_parallel_session level1 array OK
par_ksh_env_parallel_session ### level0+1 should be hidden, level2 should be transferred
par_ksh_env_parallel_session
par_ksh_env_parallel_session fail
par_ksh_env_parallel_session /usr/bin/ksh[XXX]: level0func: not found [No such file or directory]
par_ksh_env_parallel_session /usr/bin/ksh[XXX]: level0alias: not found [No such file or directory]
par_ksh_env_parallel_session
par_ksh_env_parallel_session fail
par_ksh_env_parallel_session /usr/bin/ksh[XXX]: level0func: not found [No such file or directory]
par_ksh_env_parallel_session /usr/bin/ksh[XXX]: level0alias: not found [No such file or directory]
par_ksh_env_parallel_session
par_ksh_env_parallel_session fail
par_ksh_env_parallel_session /usr/bin/ksh[XXX]: level1func: not found [No such file or directory]
par_ksh_env_parallel_session /usr/bin/ksh[XXX]: level1alias: not found [No such file or directory]
par_ksh_env_parallel_session
par_ksh_env_parallel_session fail
par_ksh_env_parallel_session /usr/bin/ksh[XXX]: level1func: not found [No such file or directory]
par_ksh_env_parallel_session /usr/bin/ksh[XXX]: level1alias: not found [No such file or directory]
par_ksh_env_parallel_session l2var
par_ksh_env_parallel_session l2func
par_ksh_env_parallel_session l2alias
par_ksh_env_parallel_session level2 array OK
par_ksh_env_parallel_session l2var
par_ksh_env_parallel_session l2func
par_ksh_env_parallel_session l2alias
par_ksh_env_parallel_session level2 array OK
par_ksh_env_parallel_session ### level0 should be hidden, level1+2 should be transferred
par_ksh_env_parallel_session
par_ksh_env_parallel_session fail
par_ksh_env_parallel_session /usr/bin/ksh[XXX]: level0func: not found [No such file or directory]
par_ksh_env_parallel_session /usr/bin/ksh[XXX]: level0alias: not found [No such file or directory]
par_ksh_env_parallel_session
par_ksh_env_parallel_session fail
par_ksh_env_parallel_session /usr/bin/ksh[XXX]: level0func: not found [No such file or directory]
par_ksh_env_parallel_session /usr/bin/ksh[XXX]: level0alias: not found [No such file or directory]
par_ksh_env_parallel_session l1var
par_ksh_env_parallel_session l1func
par_ksh_env_parallel_session l1alias
par_ksh_env_parallel_session level1 array OK
par_ksh_env_parallel_session l1var
par_ksh_env_parallel_session l1func
par_ksh_env_parallel_session l1alias
par_ksh_env_parallel_session level1 array OK
par_ksh_env_parallel_session l2var
par_ksh_env_parallel_session l2func
par_ksh_env_parallel_session l2alias
par_ksh_env_parallel_session level2 array OK
par_ksh_env_parallel_session l2var
par_ksh_env_parallel_session l2func
par_ksh_env_parallel_session l2alias
par_ksh_env_parallel_session level2 array OK
par_ksh_env_parallel_session ### level0+1+2 should be transferred
par_ksh_env_parallel_session l0var
par_ksh_env_parallel_session l0func
par_ksh_env_parallel_session l0alias
par_ksh_env_parallel_session level0 array OK
par_ksh_env_parallel_session l0var
par_ksh_env_parallel_session l0func
par_ksh_env_parallel_session l0alias
par_ksh_env_parallel_session level0 array OK
par_ksh_env_parallel_session l1var
par_ksh_env_parallel_session l1func
par_ksh_env_parallel_session l1alias
par_ksh_env_parallel_session level1 array OK
par_ksh_env_parallel_session l1var
par_ksh_env_parallel_session l1func
par_ksh_env_parallel_session l1alias
par_ksh_env_parallel_session level1 array OK
par_ksh_env_parallel_session l2var
par_ksh_env_parallel_session l2func
par_ksh_env_parallel_session l2alias
par_ksh_env_parallel_session level2 array OK
par_ksh_env_parallel_session l2var
par_ksh_env_parallel_session l2func
par_ksh_env_parallel_session l2alias
par_ksh_env_parallel_session level2 array OK
par_ksh_env_parallel_session /usr/bin/ksh: line 3: aliasbefore: not found
par_ksh_env_parallel_session /usr/bin/ksh: line 3: aliasbefore: not found
par_ksh_env_parallel_session /usr/bin/ksh: line 3: funcbefore: not found
par_ksh_env_parallel_session /usr/bin/ksh: line 3: funcbefore: not found
par_ksh_env_parallel_session no_before par_ksh_env_parallel_session no_before
par_ksh_env_parallel_session no_before par_ksh_env_parallel_session no_before
par_ksh_env_parallel_session no_before par_ksh_env_parallel_session no_before
@ -1321,8 +1693,100 @@ par_dash_environment_too_big fail_bigfunc_remote-not-supported
par_dash_environment_too_big fail_bigfunc_quote-not-supported par_dash_environment_too_big fail_bigfunc_quote-not-supported
par_dash_environment_too_big fail_bigfunc_quote_remote-not-supported par_dash_environment_too_big fail_bigfunc_quote_remote-not-supported
par_dash_env_parallel_session ### Test env_parallel --session par_dash_env_parallel_session ### Test env_parallel --session
par_dash_env_parallel_session /bin/dash: XXX: aliasbefore: not found par_dash_env_parallel_session ### level0 should be hidden, level1 should be transferred
par_dash_env_parallel_session /bin/dash: XXX: aliasbefore: not found par_dash_env_parallel_session
par_dash_env_parallel_session /bin/dash: XXX: level0func: not found
par_dash_env_parallel_session /bin/dash: XXX: level0alias: not found
par_dash_env_parallel_session /bin/dash: XXX: Bad substitution
par_dash_env_parallel_session
par_dash_env_parallel_session /bin/dash: XXX: level0func: not found
par_dash_env_parallel_session /bin/dash: XXX: level0alias: not found
par_dash_env_parallel_session /bin/dash: XXX: Bad substitution
par_dash_env_parallel_session l1var
par_dash_env_parallel_session l1alias
par_dash_env_parallel_session /bin/dash: XXX: level1func: not found
par_dash_env_parallel_session /bin/dash: XXX: Bad substitution
par_dash_env_parallel_session l1var
par_dash_env_parallel_session l1alias
par_dash_env_parallel_session /bin/dash: XXX: level1func: not found
par_dash_env_parallel_session /bin/dash: XXX: Bad substitution
par_dash_env_parallel_session ### level0+1 should be hidden, level2 should be transferred
par_dash_env_parallel_session
par_dash_env_parallel_session /bin/dash: 3: level0func: not found
par_dash_env_parallel_session /bin/dash: 3: level0alias: not found
par_dash_env_parallel_session /bin/dash: 3: Bad substitution
par_dash_env_parallel_session
par_dash_env_parallel_session /bin/dash: 3: level0func: not found
par_dash_env_parallel_session /bin/dash: 3: level0alias: not found
par_dash_env_parallel_session /bin/dash: 3: Bad substitution
par_dash_env_parallel_session
par_dash_env_parallel_session /bin/dash: 3: level1func: not found
par_dash_env_parallel_session /bin/dash: 3: level1alias: not found
par_dash_env_parallel_session /bin/dash: 3: Bad substitution
par_dash_env_parallel_session
par_dash_env_parallel_session /bin/dash: 3: level1func: not found
par_dash_env_parallel_session /bin/dash: 3: level1alias: not found
par_dash_env_parallel_session /bin/dash: 3: Bad substitution
par_dash_env_parallel_session l2var
par_dash_env_parallel_session l2alias
par_dash_env_parallel_session /bin/dash: 3: level2func: not found
par_dash_env_parallel_session /bin/dash: 3: Bad substitution
par_dash_env_parallel_session l2var
par_dash_env_parallel_session l2alias
par_dash_env_parallel_session /bin/dash: 3: level2func: not found
par_dash_env_parallel_session /bin/dash: 3: Bad substitution
par_dash_env_parallel_session ### level0 should be hidden, level1+2 should be transferred
par_dash_env_parallel_session
par_dash_env_parallel_session /bin/dash: XXX: level0func: not found
par_dash_env_parallel_session /bin/dash: XXX: level0alias: not found
par_dash_env_parallel_session /bin/dash: XXX: Bad substitution
par_dash_env_parallel_session
par_dash_env_parallel_session /bin/dash: XXX: level0func: not found
par_dash_env_parallel_session /bin/dash: XXX: level0alias: not found
par_dash_env_parallel_session /bin/dash: XXX: Bad substitution
par_dash_env_parallel_session l1var
par_dash_env_parallel_session l1alias
par_dash_env_parallel_session /bin/dash: XXX: level1func: not found
par_dash_env_parallel_session /bin/dash: XXX: Bad substitution
par_dash_env_parallel_session l1var
par_dash_env_parallel_session l1alias
par_dash_env_parallel_session /bin/dash: XXX: level1func: not found
par_dash_env_parallel_session /bin/dash: XXX: Bad substitution
par_dash_env_parallel_session l2var
par_dash_env_parallel_session l2alias
par_dash_env_parallel_session /bin/dash: XXX: level2func: not found
par_dash_env_parallel_session /bin/dash: XXX: Bad substitution
par_dash_env_parallel_session l2var
par_dash_env_parallel_session l2alias
par_dash_env_parallel_session /bin/dash: XXX: level2func: not found
par_dash_env_parallel_session /bin/dash: XXX: Bad substitution
par_dash_env_parallel_session ### level0+1+2 should be transferred
par_dash_env_parallel_session l0var
par_dash_env_parallel_session l0alias
par_dash_env_parallel_session /bin/dash: XXX: level0func: not found
par_dash_env_parallel_session /bin/dash: XXX: Bad substitution
par_dash_env_parallel_session l0var
par_dash_env_parallel_session l0alias
par_dash_env_parallel_session /bin/dash: XXX: level0func: not found
par_dash_env_parallel_session /bin/dash: XXX: Bad substitution
par_dash_env_parallel_session l1var
par_dash_env_parallel_session l1alias
par_dash_env_parallel_session /bin/dash: XXX: level1func: not found
par_dash_env_parallel_session /bin/dash: XXX: Bad substitution
par_dash_env_parallel_session l1var
par_dash_env_parallel_session l1alias
par_dash_env_parallel_session /bin/dash: XXX: level1func: not found
par_dash_env_parallel_session /bin/dash: XXX: Bad substitution
par_dash_env_parallel_session l2var
par_dash_env_parallel_session l2alias
par_dash_env_parallel_session /bin/dash: XXX: level2func: not found
par_dash_env_parallel_session /bin/dash: XXX: Bad substitution
par_dash_env_parallel_session l2var
par_dash_env_parallel_session l2alias
par_dash_env_parallel_session /bin/dash: XXX: level2func: not found
par_dash_env_parallel_session /bin/dash: XXX: Bad substitution
par_dash_env_parallel_session /bin/dash: 1: aliasbefore: not found
par_dash_env_parallel_session /bin/dash: 1: aliasbefore: not found
par_dash_env_parallel_session no_before par_dash_env_parallel_session no_before
par_dash_env_parallel_session no_before par_dash_env_parallel_session no_before
par_dash_env_parallel_session after aliasafter_OK par_dash_env_parallel_session after aliasafter_OK
@ -1676,23 +2140,115 @@ par_bash_environment_too_big env_parallel: Error: 3. Try running this in a clean
par_bash_environment_too_big env_parallel: Error: env_parallel --record-env par_bash_environment_too_big env_parallel: Error: env_parallel --record-env
par_bash_environment_too_big env_parallel: Error: And then use '--env _' par_bash_environment_too_big env_parallel: Error: And then use '--env _'
par_bash_environment_too_big env_parallel: Error: For details see: man env_parallel par_bash_environment_too_big env_parallel: Error: For details see: man env_parallel
par_bash_env_parallel_session ### Test env_parallel --session par_bash_env_parallel_session ### Test env_parallel --session / --end-session
par_bash_env_parallel_session /bin/bash: line XXX: aliasbefore: command not found par_bash_env_parallel_session ### level0 should be hidden, level1 should be transferred
par_bash_env_parallel_session /bin/bash: line XXX: aliasbefore: command not found par_bash_env_parallel_session
par_bash_env_parallel_session /bin/bash: line XXX: funcbefore: command not found par_bash_env_parallel_session fail
par_bash_env_parallel_session /bin/bash: line XXX: funcbefore: command not found par_bash_env_parallel_session /bin/bash: line XXX: level0func: command not found
par_bash_env_parallel_session /bin/bash: line XXX: level0alias: command not found
par_bash_env_parallel_session
par_bash_env_parallel_session fail
par_bash_env_parallel_session /bin/bash: line XXX: level0func: command not found
par_bash_env_parallel_session /bin/bash: line XXX: level0alias: command not found
par_bash_env_parallel_session l1var
par_bash_env_parallel_session l1func
par_bash_env_parallel_session l1alias
par_bash_env_parallel_session level1 array OK
par_bash_env_parallel_session l1var
par_bash_env_parallel_session l1func
par_bash_env_parallel_session l1alias
par_bash_env_parallel_session level1 array OK
par_bash_env_parallel_session ### level0+1 should be hidden, level2 should be transferred
par_bash_env_parallel_session
par_bash_env_parallel_session fail
par_bash_env_parallel_session /bin/bash: line XXX: level0func: command not found
par_bash_env_parallel_session /bin/bash: line XXX: level0alias: command not found
par_bash_env_parallel_session
par_bash_env_parallel_session fail
par_bash_env_parallel_session /bin/bash: line XXX: level0func: command not found
par_bash_env_parallel_session /bin/bash: line XXX: level0alias: command not found
par_bash_env_parallel_session
par_bash_env_parallel_session fail
par_bash_env_parallel_session /bin/bash: line XXX: level1func: command not found
par_bash_env_parallel_session /bin/bash: line XXX: level1alias: command not found
par_bash_env_parallel_session
par_bash_env_parallel_session fail
par_bash_env_parallel_session /bin/bash: line XXX: level1func: command not found
par_bash_env_parallel_session /bin/bash: line XXX: level1alias: command not found
par_bash_env_parallel_session l2var
par_bash_env_parallel_session l2func
par_bash_env_parallel_session l2alias
par_bash_env_parallel_session level2 array OK
par_bash_env_parallel_session l2var
par_bash_env_parallel_session l2func
par_bash_env_parallel_session l2alias
par_bash_env_parallel_session level2 array OK
par_bash_env_parallel_session ### level0 should be hidden, level1+2 should be transferred
par_bash_env_parallel_session
par_bash_env_parallel_session fail
par_bash_env_parallel_session /bin/bash: line XXX: level0func: command not found
par_bash_env_parallel_session /bin/bash: line XXX: level0alias: command not found
par_bash_env_parallel_session
par_bash_env_parallel_session fail
par_bash_env_parallel_session /bin/bash: line XXX: level0func: command not found
par_bash_env_parallel_session /bin/bash: line XXX: level0alias: command not found
par_bash_env_parallel_session l1var
par_bash_env_parallel_session l1func
par_bash_env_parallel_session l1alias
par_bash_env_parallel_session level1 array OK
par_bash_env_parallel_session l1var
par_bash_env_parallel_session l1func
par_bash_env_parallel_session l1alias
par_bash_env_parallel_session level1 array OK
par_bash_env_parallel_session l2var
par_bash_env_parallel_session l2func
par_bash_env_parallel_session l2alias
par_bash_env_parallel_session level2 array OK
par_bash_env_parallel_session l2var
par_bash_env_parallel_session l2func
par_bash_env_parallel_session l2alias
par_bash_env_parallel_session level2 array OK
par_bash_env_parallel_session ### level0+1+2 should be transferred
par_bash_env_parallel_session l0var
par_bash_env_parallel_session l0func
par_bash_env_parallel_session l0alias
par_bash_env_parallel_session level0 array OK
par_bash_env_parallel_session l0var
par_bash_env_parallel_session l0func
par_bash_env_parallel_session l0alias
par_bash_env_parallel_session level0 array OK
par_bash_env_parallel_session l1var
par_bash_env_parallel_session l1func
par_bash_env_parallel_session l1alias
par_bash_env_parallel_session level1 array OK
par_bash_env_parallel_session l1var
par_bash_env_parallel_session l1func
par_bash_env_parallel_session l1alias
par_bash_env_parallel_session level1 array OK
par_bash_env_parallel_session l2var
par_bash_env_parallel_session l2func
par_bash_env_parallel_session l2alias
par_bash_env_parallel_session level2 array OK
par_bash_env_parallel_session l2var
par_bash_env_parallel_session l2func
par_bash_env_parallel_session l2alias
par_bash_env_parallel_session level2 array OK
par_bash_env_parallel_session /bin/bash: line XXX: aliasl0: command not found
par_bash_env_parallel_session /bin/bash: line XXX: aliasl0: command not found
par_bash_env_parallel_session /bin/bash: line XXX: funcl0: command not found
par_bash_env_parallel_session /bin/bash: line XXX: funcl0: command not found
par_bash_env_parallel_session no_before par_bash_env_parallel_session no_before
par_bash_env_parallel_session no_before par_bash_env_parallel_session no_before
par_bash_env_parallel_session no_before par_bash_env_parallel_session no_before
par_bash_env_parallel_session no_before par_bash_env_parallel_session no_before
par_bash_env_parallel_session after aliasafter_OK par_bash_env_parallel_session l1 aliasl1_OK
par_bash_env_parallel_session after aliasafter_OK par_bash_env_parallel_session l1 aliasl1_OK
par_bash_env_parallel_session after funcafter_OK par_bash_env_parallel_session l1 funcl1_OK
par_bash_env_parallel_session after funcafter_OK par_bash_env_parallel_session l1 funcl1_OK
par_bash_env_parallel_session after varafter_OK par_bash_env_parallel_session l1 varl1_OK
par_bash_env_parallel_session after varafter_OK par_bash_env_parallel_session l1 varl1_OK
par_bash_env_parallel_session array after arrayafter_OK par_bash_env_parallel_session array l1 arrayl1_OK
par_bash_env_parallel_session array after arrayafter_OK par_bash_env_parallel_session array l1 arrayl1_OK
par_bash_env_parallel OK par_bash_env_parallel OK
par_bash_env_parallel OK par_bash_env_parallel OK
par_bash_env_parallel alias line 1 par_bash_env_parallel alias line 1
@ -1833,8 +2389,100 @@ par_ash_environment_too_big fail_bigfunc_remote-not-supported
par_ash_environment_too_big fail_bigfunc_quote-not-supported par_ash_environment_too_big fail_bigfunc_quote-not-supported
par_ash_environment_too_big fail_bigfunc_quote_remote-not-supported par_ash_environment_too_big fail_bigfunc_quote_remote-not-supported
par_ash_env_parallel_session ### Test env_parallel --session par_ash_env_parallel_session ### Test env_parallel --session
par_ash_env_parallel_session /bin/ash: XXX: aliasbefore: not found par_ash_env_parallel_session ### level0 should be hidden, level1 should be transferred
par_ash_env_parallel_session /bin/ash: XXX: aliasbefore: not found par_ash_env_parallel_session
par_ash_env_parallel_session /bin/ash: XXX: level0func: not found
par_ash_env_parallel_session /bin/ash: XXX: level0alias: not found
par_ash_env_parallel_session /bin/ash: XXX: Bad substitution
par_ash_env_parallel_session
par_ash_env_parallel_session /bin/ash: XXX: level0func: not found
par_ash_env_parallel_session /bin/ash: XXX: level0alias: not found
par_ash_env_parallel_session /bin/ash: XXX: Bad substitution
par_ash_env_parallel_session l1var
par_ash_env_parallel_session l1alias
par_ash_env_parallel_session /bin/ash: XXX: level1func: not found
par_ash_env_parallel_session /bin/ash: XXX: Bad substitution
par_ash_env_parallel_session l1var
par_ash_env_parallel_session l1alias
par_ash_env_parallel_session /bin/ash: XXX: level1func: not found
par_ash_env_parallel_session /bin/ash: XXX: Bad substitution
par_ash_env_parallel_session ### level0+1 should be hidden, level2 should be transferred
par_ash_env_parallel_session
par_ash_env_parallel_session /bin/ash: 3: level0func: not found
par_ash_env_parallel_session /bin/ash: 3: level0alias: not found
par_ash_env_parallel_session /bin/ash: 3: Bad substitution
par_ash_env_parallel_session
par_ash_env_parallel_session /bin/ash: 3: level0func: not found
par_ash_env_parallel_session /bin/ash: 3: level0alias: not found
par_ash_env_parallel_session /bin/ash: 3: Bad substitution
par_ash_env_parallel_session
par_ash_env_parallel_session /bin/ash: 3: level1func: not found
par_ash_env_parallel_session /bin/ash: 3: level1alias: not found
par_ash_env_parallel_session /bin/ash: 3: Bad substitution
par_ash_env_parallel_session
par_ash_env_parallel_session /bin/ash: 3: level1func: not found
par_ash_env_parallel_session /bin/ash: 3: level1alias: not found
par_ash_env_parallel_session /bin/ash: 3: Bad substitution
par_ash_env_parallel_session l2var
par_ash_env_parallel_session l2alias
par_ash_env_parallel_session /bin/ash: 3: level2func: not found
par_ash_env_parallel_session /bin/ash: 3: Bad substitution
par_ash_env_parallel_session l2var
par_ash_env_parallel_session l2alias
par_ash_env_parallel_session /bin/ash: 3: level2func: not found
par_ash_env_parallel_session /bin/ash: 3: Bad substitution
par_ash_env_parallel_session ### level0 should be hidden, level1+2 should be transferred
par_ash_env_parallel_session
par_ash_env_parallel_session /bin/ash: XXX: level0func: not found
par_ash_env_parallel_session /bin/ash: XXX: level0alias: not found
par_ash_env_parallel_session /bin/ash: XXX: Bad substitution
par_ash_env_parallel_session
par_ash_env_parallel_session /bin/ash: XXX: level0func: not found
par_ash_env_parallel_session /bin/ash: XXX: level0alias: not found
par_ash_env_parallel_session /bin/ash: XXX: Bad substitution
par_ash_env_parallel_session l1var
par_ash_env_parallel_session l1alias
par_ash_env_parallel_session /bin/ash: XXX: level1func: not found
par_ash_env_parallel_session /bin/ash: XXX: Bad substitution
par_ash_env_parallel_session l1var
par_ash_env_parallel_session l1alias
par_ash_env_parallel_session /bin/ash: XXX: level1func: not found
par_ash_env_parallel_session /bin/ash: XXX: Bad substitution
par_ash_env_parallel_session l2var
par_ash_env_parallel_session l2alias
par_ash_env_parallel_session /bin/ash: XXX: level2func: not found
par_ash_env_parallel_session /bin/ash: XXX: Bad substitution
par_ash_env_parallel_session l2var
par_ash_env_parallel_session l2alias
par_ash_env_parallel_session /bin/ash: XXX: level2func: not found
par_ash_env_parallel_session /bin/ash: XXX: Bad substitution
par_ash_env_parallel_session ### level0+1+2 should be transferred
par_ash_env_parallel_session l0var
par_ash_env_parallel_session l0alias
par_ash_env_parallel_session /bin/ash: XXX: level0func: not found
par_ash_env_parallel_session /bin/ash: XXX: Bad substitution
par_ash_env_parallel_session l0var
par_ash_env_parallel_session l0alias
par_ash_env_parallel_session /bin/ash: XXX: level0func: not found
par_ash_env_parallel_session /bin/ash: XXX: Bad substitution
par_ash_env_parallel_session l1var
par_ash_env_parallel_session l1alias
par_ash_env_parallel_session /bin/ash: XXX: level1func: not found
par_ash_env_parallel_session /bin/ash: XXX: Bad substitution
par_ash_env_parallel_session l1var
par_ash_env_parallel_session l1alias
par_ash_env_parallel_session /bin/ash: XXX: level1func: not found
par_ash_env_parallel_session /bin/ash: XXX: Bad substitution
par_ash_env_parallel_session l2var
par_ash_env_parallel_session l2alias
par_ash_env_parallel_session /bin/ash: XXX: level2func: not found
par_ash_env_parallel_session /bin/ash: XXX: Bad substitution
par_ash_env_parallel_session l2var
par_ash_env_parallel_session l2alias
par_ash_env_parallel_session /bin/ash: XXX: level2func: not found
par_ash_env_parallel_session /bin/ash: XXX: Bad substitution
par_ash_env_parallel_session /bin/ash: 1: aliasbefore: not found
par_ash_env_parallel_session /bin/ash: 1: aliasbefore: not found
par_ash_env_parallel_session no_before par_ash_env_parallel_session no_before
par_ash_env_parallel_session no_before par_ash_env_parallel_session no_before
par_ash_env_parallel_session after aliasafter_OK par_ash_env_parallel_session after aliasafter_OK

View file

@ -7,7 +7,7 @@ par_zsh_embed code
par_zsh_embed here par_zsh_embed here
par_zsh_embed parallel_OK par_zsh_embed parallel_OK
par_zsh_embed env_parallel --env OK par_zsh_embed env_parallel --env OK
par_zsh_embed _which_PAR:12: argument list too long: perl par_zsh_embed _which_PAR:13: argument list too long: perl
par_zsh_embed env_parallel: Error: Your environment is too big. par_zsh_embed env_parallel: Error: Your environment is too big.
par_zsh_embed env_parallel: Error: You can try 3 different approaches: par_zsh_embed env_parallel: Error: You can try 3 different approaches:
par_zsh_embed env_parallel: Error: 1. Run 'env_parallel --session' before you set par_zsh_embed env_parallel: Error: 1. Run 'env_parallel --session' before you set