-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove find.pl for File::Find * Support python and excluding .git * Light whitespace changes
- Loading branch information
Joshua Uziel
committed
Aug 28, 2014
1 parent
c326462
commit e1b2b4f
Showing
7 changed files
with
44 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Code Grep and Vi Grepped | ||
cg, vg - tools for finding and modifying on keywords | ||
Joshua Uziel <[email protected]> - March 13, 2002 - version 1.6.2 | ||
Joshua Uziel <[email protected]> - August 28, 2014 - version 1.6.3 | ||
|
||
[Note: the below is historical... SCO released cscope under a BSD | ||
license several months ago (http://cscope.sourceforge.net/), which | ||
|
@@ -18,8 +18,8 @@ is defined... not wherever it is used, which makes it frustrating | |
when, for example, you're at the definition of a function and | ||
instead want to see who and what use that function. | ||
|
||
So, as a quick hack, mostly for myself, I started writing up some | ||
perl scripts (I consciously chose perl, but considered other | ||
So, as a quick hack, mostly for myself, I started writing up some | ||
perl scripts (I consciously chose perl, but considered other | ||
languages first). One script, "cg", does the equivalent of a find | ||
and grep, storing matches and then displaying it in a human-friendly | ||
manner. Run it like so: | ||
|
@@ -56,7 +56,7 @@ as well as a built-in pager. The pager allows for colors while | |
paging (that "more" or "less" can't deal with), as well as allowing | ||
one to go back or launch an editor directly using our other script... | ||
|
||
The other script is called "vg" and opens an editor on what has been | ||
The other script is called "vg" and opens an editor on what has been | ||
grepped (most editors work). So remember that count? All you | ||
have to do is run "vg count" and it'll fire off a editor in that file | ||
and at that line number. So, in our example, running "vg 1" would | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# cgvg-common.pl - common variables and functions to cgvg | ||
# Copyright 2000-2002 by Joshua Uziel <[email protected]> - version 1.6.2 | ||
# Copyright 2000-2014 by Joshua Uziel <[email protected]> - version 1.6.3 | ||
# | ||
# This program is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU General Public License | ||
|
@@ -30,12 +30,11 @@ | |
$RCFILE = "$ENV{'HOME'}/.cgvgrc"; | ||
|
||
# Default search list: | ||
# Make* *.c *.h *.s *.cc *.pl *.pm *.java *.*sh *.idl | ||
$SEARCH = '(^Make.*$|^.*\.([chslySC]|cc|p[lm]|java|php|.*sh|idl)$)'; | ||
|
||
# Make* *.c *.h *.s *.cc *.pl *.pm *.py *.java *.*sh *.idl | ||
$SEARCH = '(^Make.*$|^.*\.([chslySC]|cc|p[lmy]|java|php|.*sh|idl)$)'; | ||
|
||
# List of files and strings to exclude from our search. | ||
$EXCLUDE = "SCCS|RCS|tags|\.make\.state"; | ||
$EXCLUDE = "SCCS|RCS|tags|\.make\.state|\.git"; | ||
|
||
# Oldest age (in days) before we delete. | ||
$AGE = 30; | ||
|
@@ -88,7 +87,7 @@ | |
# Set b (bold) and c (color) values for printing | ||
for ($i=1; $i<=5; $i++) { | ||
$c[$i] = $colors{$color[$i]}; | ||
$b[$i] = ($color[$i] =~ /^b_/) ? 1 : 0; | ||
$b[$i] = ($color[$i] =~ /^b_/) ? 1 : 0; | ||
} | ||
|
||
# Code to parse the RCFILE entries | ||
|
@@ -129,7 +128,7 @@ sub parse_rcfile { | |
} elsif ($key =~ /^COLOR[1-5]$/) { | ||
|
||
# See that a legal color has been given | ||
if ($value =~ | ||
if ($value =~ | ||
/^(black|red|green|yellow|blue|magenta|cyan|white|\ | ||
|b_black|b_red|b_green|b_yellow|b_blue|b_magenta|b_cyan|b_white)$/) { | ||
$coltmp = $key; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters