aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2003-10-10 23:15:23 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2003-10-10 23:15:23 +0000
commitd12061b299a096359b998e0e4415ebe77b45c96b (patch)
tree81365b3c63842635d51d2af65695a5a59aeafdb6
parent61796945e37a6cd9dd230e8e7a86536ad58fcd14 (diff)
downloadbusybox-w32-d12061b299a096359b998e0e4415ebe77b45c96b.tar.gz
busybox-w32-d12061b299a096359b998e0e4415ebe77b45c96b.tar.bz2
busybox-w32-d12061b299a096359b998e0e4415ebe77b45c96b.zip
Vodz last_patch_117, update options for new xargs
-rw-r--r--findutils/Config.in36
-rw-r--r--include/usage.h23
2 files changed, 51 insertions, 8 deletions
diff --git a/findutils/Config.in b/findutils/Config.in
index c66da742c..da8017af6 100644
--- a/findutils/Config.in
+++ b/findutils/Config.in
@@ -97,13 +97,37 @@ config CONFIG_XARGS
97 xargs is used to execute a specified command on 97 xargs is used to execute a specified command on
98 every item from standard input. 98 every item from standard input.
99 99
100config CONFIG_FEATURE_XARGS_FANCY 100config CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION
101 bool " Enable extra options (-x -s -n and -E)" 101 bool " Enable prompt and confirmation option -p"
102 default y 102 default n
103 depends on CONFIG_XARGS 103 depends on CONFIG_XARGS
104 help 104 help
105 Default xargs only provides the -t option, this enables the 105 Support prompt the user about whether to run each command
106 x, s, n and E options. 106 line and read a line from the terminal.
107 107
108endmenu 108config CONFIG_FEATURE_XARGS_SUPPORT_QUOTES
109 bool " Enable support single and double quotes and backslash"
110 default n
111 depends on CONFIG_XARGS
112 help
113 Default xargs unsupport single and double quotes
114 and backslash for can use aruments with spaces.
109 115
116config CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT
117 bool " Enable support options -x"
118 default n
119 depends on CONFIG_XARGS
120 help
121 Enable support exit if the size (see the -s or -n option)
122 is exceeded.
123
124config CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM
125 bool " Enable options -0"
126 default n
127 depends on CONFIG_XARGS
128 help
129 Enable input filenames are terminated by a null character
130 instead of by whitespace, and the quotes and backslash
131 are not special.
132
133endmenu
diff --git a/include/usage.h b/include/usage.h
index 0b03102a7..851023ea5 100644
--- a/include/usage.h
+++ b/include/usage.h
@@ -2736,13 +2736,32 @@
2736#define whoami_full_usage \ 2736#define whoami_full_usage \
2737 "Prints the user name associated with the current effective user id." 2737 "Prints the user name associated with the current effective user id."
2738 2738
2739#ifdef CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION
2740#define USAGE_XARGS_CONFIRMATION(a) a
2741#else
2742#define USAGE_XARGS_CONFIRMATION(a)
2743#endif
2744#ifdef CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT
2745#define USAGE_XARGS_TERMOPT(a) a
2746#else
2747#define USAGE_XARGS_TERMOPT(a)
2748#endif
2749#ifdef CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM
2750#define USAGE_XARGS_ZERO_TERM(a) a
2751#else
2752#define USAGE_XARGS_ZERO_TERM(a)
2753#endif
2754
2755
2739#define xargs_trivial_usage \ 2756#define xargs_trivial_usage \
2740 "[COMMAND] [-prt] [ARGS...]" 2757 "[COMMAND] [OPTIONS] [ARGS...]"
2741#define xargs_full_usage \ 2758#define xargs_full_usage \
2742 "Executes COMMAND on every item given by standard input.\n\n" \ 2759 "Executes COMMAND on every item given by standard input.\n\n" \
2743 "Options:\n" \ 2760 "Options:\n" \
2744 "\t-p\tPrompt the user about whether to run each command\n" \ 2761 USAGE_XARGS_CONFIRMATION("\t-p\tPrompt the user about whether to run each command\n") \
2745 "\t-r\tDo not run command for empty readed lines\n" \ 2762 "\t-r\tDo not run command for empty readed lines\n" \
2763 USAGE_XARGS_TERMOPT("\t-x\tExit if the size is exceeded\n") \
2764 USAGE_XARGS_ZERO_TERM("\t-0\tInput filenames are terminated by a null character\n") \
2746 "\t-t\tPrint the command line on stderr before executing it." 2765 "\t-t\tPrint the command line on stderr before executing it."
2747#define xargs_example_usage \ 2766#define xargs_example_usage \
2748 "$ ls | xargs gzip\n" \ 2767 "$ ls | xargs gzip\n" \