001package org.unix4j.unix.xargs;
002
003import org.unix4j.unix.Xargs;
004
005/**
006 * Options for the {@link Xargs xargs} command with the 
007 * the following options: 
008 * <p>
009 * <table>
010 * <tr valign="top"><td width="10px"></td><td nowrap="nowrap">{@code -z}</td><td>&nbsp;&nbsp;</td><td nowrap="nowrap">{@code --delimiter0}</td><td>&nbsp;</td><td>Input items are terminated by a null character instead of by 
011                        whitespace, and the quotes and backslash are not special (every
012                        character is taken literally). Disables the end of file string,
013                        which is treated like any other argument. Useful when input items 
014                        might contain white space, quote marks, or backslashes. The find 
015                        --print0 option produces input suitable for this mode.
016                        <p>
017                        (This option is ignored if an explicit delimiter operand is specified).</td></tr>
018 * <tr valign="top"><td width="10px"></td><td nowrap="nowrap">{@code -x}</td><td>&nbsp;&nbsp;</td><td nowrap="nowrap">{@code --exactArgs}</td><td>&nbsp;</td><td>Terminate immediately if {@code maxArgs} is specified but the found
019                        number of variable items is less than {@code maxArgs}.          
020<p>
021                        (This option is ignored if no {@code maxArgs} operand is specified).</td></tr>
022 * <tr valign="top"><td width="10px"></td><td nowrap="nowrap">{@code -r}</td><td>&nbsp;&nbsp;</td><td nowrap="nowrap">{@code --noRunIfEmpty}</td><td>&nbsp;</td><td>If the standard input does not contain any nonblanks, do not run the
023                        command. Normally, the command is run once even if there is no 
024                        input.</td></tr>
025 * <tr valign="top"><td width="10px"></td><td nowrap="nowrap">{@code -t}</td><td>&nbsp;&nbsp;</td><td nowrap="nowrap">{@code --verbose}</td><td>&nbsp;</td><td>Print the command line on the standard error output before executing
026                        it.</td></tr>
027 * </table>
028 * <p>
029 * This class serves as entry point to every possible set of {@code xargs} options
030 * defined as an enum constant. With this explicit expansion of all possible 
031 * option combinations, options can be passed to the command in a very compact 
032 * form, such as:
033 * <pre>
034 * xargs(Xargs.Options.z, ...);
035 * xargs(Xargs.Options.z.x, ...);
036 * ...
037 * xargs(Xargs.Options.z.x.r.t, ...);
038 * </pre>
039 */
040public final class XargsOptionSets {
041        /**
042         * The singleton instance.
043         */
044        public static final XargsOptionSets INSTANCE = new XargsOptionSets();
045        
046        /**
047         * Option {@code "-z"}: Input items are terminated by a null character instead of by 
048                        whitespace, and the quotes and backslash are not special (every
049                        character is taken literally). Disables the end of file string,
050                        which is treated like any other argument. Useful when input items 
051                        might contain white space, quote marks, or backslashes. The find 
052                        --print0 option produces input suitable for this mode.
053                        <p>
054                        (This option is ignored if an explicit delimiter operand is specified).
055         * <p>
056         * The option {@code "-z"} is equivalent to the {@code "--}{@link #delimiter0 delimiter0}{@code "} option.
057         */
058        public final XargsOptionSet_rtxz z = XargsOptionSet_rtxz.Active_z;  
059        /**
060         * Option {@code "--delimiter0"}: Input items are terminated by a null character instead of by 
061                        whitespace, and the quotes and backslash are not special (every
062                        character is taken literally). Disables the end of file string,
063                        which is treated like any other argument. Useful when input items 
064                        might contain white space, quote marks, or backslashes. The find 
065                        --print0 option produces input suitable for this mode.
066                        <p>
067                        (This option is ignored if an explicit delimiter operand is specified).
068         * <p>
069         * The option {@code "--delimiter0"} is equivalent to the {@code "-}{@link #z z}{@code "} option.
070         */
071        public final XargsOptionSet_rtxz delimiter0 = XargsOptionSet_rtxz.Active_z_long;  
072        /**
073         * Option {@code "-x"}: Terminate immediately if {@code maxArgs} is specified but the found
074                        number of variable items is less than {@code maxArgs}.          
075<p>
076                        (This option is ignored if no {@code maxArgs} operand is specified).
077         * <p>
078         * The option {@code "-x"} is equivalent to the {@code "--}{@link #exactArgs exactArgs}{@code "} option.
079         */
080        public final XargsOptionSet_rtxz x = XargsOptionSet_rtxz.Active_x;  
081        /**
082         * Option {@code "--exactArgs"}: Terminate immediately if {@code maxArgs} is specified but the found
083                        number of variable items is less than {@code maxArgs}.          
084<p>
085                        (This option is ignored if no {@code maxArgs} operand is specified).
086         * <p>
087         * The option {@code "--exactArgs"} is equivalent to the {@code "-}{@link #x x}{@code "} option.
088         */
089        public final XargsOptionSet_rtxz exactArgs = XargsOptionSet_rtxz.Active_x_long;  
090        /**
091         * Option {@code "-r"}: If the standard input does not contain any nonblanks, do not run the
092                        command. Normally, the command is run once even if there is no 
093                        input.
094         * <p>
095         * The option {@code "-r"} is equivalent to the {@code "--}{@link #noRunIfEmpty noRunIfEmpty}{@code "} option.
096         */
097        public final XargsOptionSet_rtxz r = XargsOptionSet_rtxz.Active_r;  
098        /**
099         * Option {@code "--noRunIfEmpty"}: If the standard input does not contain any nonblanks, do not run the
100                        command. Normally, the command is run once even if there is no 
101                        input.
102         * <p>
103         * The option {@code "--noRunIfEmpty"} is equivalent to the {@code "-}{@link #r r}{@code "} option.
104         */
105        public final XargsOptionSet_rtxz noRunIfEmpty = XargsOptionSet_rtxz.Active_r_long;  
106        /**
107         * Option {@code "-t"}: Print the command line on the standard error output before executing
108                        it.
109         * <p>
110         * The option {@code "-t"} is equivalent to the {@code "--}{@link #verbose verbose}{@code "} option.
111         */
112        public final XargsOptionSet_rtxz t = XargsOptionSet_rtxz.Active_t;  
113        /**
114         * Option {@code "--verbose"}: Print the command line on the standard error output before executing
115                        it.
116         * <p>
117         * The option {@code "--verbose"} is equivalent to the {@code "-}{@link #t t}{@code "} option.
118         */
119        public final XargsOptionSet_rtxz verbose = XargsOptionSet_rtxz.Active_t_long;  
120        
121}