changelog shortlog tags branches files raw gz bz2 help

Mercurial > hg > plan9front / changeset: Remove trailing whitespace.

changeset 7261: 5151baad508e
parent 7260: 16895cffe792
child 7262: f0621f169310
author: Ori Bernstein <ori@eigenstate.org>
date: Tue, 04 Jun 2019 22:47:07 -0700
files: rc/bin/g
description: Remove trailing whitespace.
     1.1--- a/rc/bin/g
     1.2+++ b/rc/bin/g
     1.3@@ -1,4 +1,4 @@
     1.4-#!/bin/rc 
     1.5+#!/bin/rc
     1.6 rfork e
     1.7 nl='
     1.8 '
     1.9@@ -9,21 +9,21 @@ while(! ~ $#* 1 && ~ $1 -* && ! ~ $1 --)
    1.10 		recurse=-n1
    1.11 	if not
    1.12 		flags=($flags $1);
    1.13-	shift 
    1.14-} 
    1.15-if(~ $1 --) 
    1.16-	shift 
    1.17+	shift
    1.18+}
    1.19+if(~ $1 --)
    1.20+	shift
    1.21 
    1.22-switch($#*){ 
    1.23-case 0 
    1.24-	echo 'usage: g [flags] pattern [files]' >[1=2] 
    1.25-	exit usage 
    1.26-case 1 
    1.27+switch($#*){
    1.28+case 0
    1.29+	echo 'usage: g [flags] pattern [files]' >[1=2]
    1.30+	exit usage
    1.31+case 1
    1.32 	pattern=$1
    1.33 	files=`$nl{walk -f $recurse | grep '\.([bcChlmsy]|asm|awk|cc|cgi|cpp|cs|go|goc|java|lx|ms|pl|py|rc|tex|xy)$' >[2]/dev/null}
    1.34-case * 
    1.35-	pattern=$1 
    1.36-	shift 
    1.37-	files=($*) 
    1.38-} 
    1.39+case *
    1.40+	pattern=$1
    1.41+	shift
    1.42+	files=($*)
    1.43+}
    1.44 grep -n $flags -- $pattern $files /dev/null