NAME

cs - Search & replace text (with some intelligence)

VERSION

This documentation refers to cs version 0.1.

SYNOPSIS

  cs [option] search
  cr [option] search replace

OPTIONS:
 Search:
  -A --all      Find all parts on regardless of order on the line
  -W --words
                Similar to --all but with out the reordering
  -i --ignore-case
                Turn off case sensitive searching
  -w --whole    Makes the match only whole words (ie wraps with (?<\W) & (?=\W))
  -c --contains=re
                Only show matches if the file also matches this sub regex.
                This may be declared more that once and the results are ORed.
  -S --not-contains=re
                Ignore any files whoes contents match this regex.
  -m --smart    converts multi part regexes baised on what is imput
                eg cs ss Class is converted to cs class Class
                   cs n func                   cs function func
                   cs b subroutine             cs sub subroutine
 Replace:
  -r --replace=string
                String to replace found text with
 Files:
  -p --path=string
                A colon seperated list of directories to search in
                (Default current directory)
  -l --follow-symlinks
                Follow symlinks to directories
     --no-follow-symlinks
                Don't follow symlinks to directories
     --recurse  Recurse into subdirectories (Default)
     --no-recurse
                Turns off recursing into subdirectories
  -n --file-include=string
                Only include files mathcing the regex (Multiple)
  -N --int=string
     --include-type=string
                Only include files the specified type (Mulitple)
                see perldoc File::CodeSearch::Files available types
  -x --file-exclude=string
                Don't include files mathcing the regex (Multiple)
  -X --ext=string
     --exclude-type=string
                Don't include files the specified type (Mulitple)
                see perldoc File::CodeSearch::Files available types
     --file-ignore=string
                Replace the default ignore regex
  -d --file-ignore-add=string
                Add this regex to the list of ignored files
  -r --file-ignore-remove=string
                Remove this regex to the list of ignored files
 Output:
  -s --suround=int
                Show int lines before and after a match
  -b --before=int
                Show int lines before a match
  -a --after=int
                Show int lines after a match
  -t --totals
                Show the total number of lines & files matched
  -f --files-only
                Show only the file names containg matches
  -L --last=[function|class|sub]
                Show the last function, class or sub name found before the
                matched line.
 Other:
  -E --execute=cmd
                Run this command with the found files as arguments
  -P --project=string
                Use the specified projects default settings
  -C --config=file
                Use the specified file as the config file instead of the
                deafult ~/.cs

  -v --verbose  Show more detailed option
     --version  Prints the version information
     --help     Prints this help information
     --man      Prints the full documentation for cs

DESCRIPTION

SUBROUTINES/METHODS

DIAGNOSTICS

CONFIGURATION AND ENVIRONMENT

A configuration file placed in ~/.csrc (or specified through --conf) allows allows the setting of default values

<default>
    smart = 1
</default>
<project proj>
  exclude = /path/to/excluded/dir
</project>

If you were to create a symlink to cs called proj the proj options would be selected automatically (unless you specify a project with --project).

DEPENDENCIES

INCOMPATIBILITIES

BUGS AND LIMITATIONS

There are no known bugs in this module.

Please report problems to Ivan Wills (ivan.wills@gmail.com).

Patches are welcome.

AUTHOR

Ivan Wills - (ivan.wills@gmail.com)

LICENSE AND COPYRIGHT

Copyright (c) 2009 Ivan Wills (14 Mullion Close, Hornsby Heights, NSW Australia 2077). All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.