tcsh_completion_build.sh: fixed error caused by xargs on Linux
authorTK Soh <tksoh@freescale.com>
Tue, 30 Aug 2005 11:17:20 +0200
changeset 1157 6e66235084d9
parent 1156 1d5996d39c9d
child 1158 4650ec7ef690
tcsh_completion_build.sh: fixed error caused by xargs on Linux
contrib/tcsh_completion_build.sh
--- a/contrib/tcsh_completion_build.sh	Tue Aug 30 11:16:31 2005 +0200
+++ b/contrib/tcsh_completion_build.sh	Tue Aug 30 11:17:20 2005 +0200
@@ -38,14 +38,13 @@
 hg_commands=`hg --debug help | \
         sed -e '1,/^list of commands:/d' \
             -e '/^global options:/,$d' \
-            -e '/^ [^ ]/!d; s/[,:]//g;' | 
+            -e '/^ [^ ]/!d; s/[,:]//g;' | \
         xargs -n5 | \
-        sed -e '$!s/$/ \\\\/g; 2,$s/^ \{0,\}/    /g'`
+        sed -e '$!s/$/ \\\\/g; 2,$s/^ */    /g'`
 
 hg_global_options=`hg -v help | \
         sed -e '1,/global/d;/^ *-/!d; s/ [^- ].*//' | \
-        xargs -n5 | \
-        sed -e '$!s/$/ \\\\/g; 2,$s/^ \{0,\}/    /g'`
+        sed -e 's/ *$//; $!s/$/ \\\\/g; 2,$s/^ */    /g'`
 
 hg_version=`hg version | sed -e '1q'`