├── .gitignore
├── Commands
└── Ack in Project.tmCommand
├── README.textile
├── Support
├── ack-standalone.sh
├── environment.rb
├── lib
│ ├── search.rb
│ ├── search_dialog.rb
│ └── search_results.rb
├── nibs
│ └── AckInProjectSearch.nib
│ │ ├── classes.nib
│ │ ├── info.nib
│ │ └── keyedobjects.nib
├── search.css
└── search.js
└── info.plist
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | *~.nib
3 | *.tm_build_errors
4 | *.pbxuser
5 | *.perspective
6 |
--------------------------------------------------------------------------------
/Commands/Ack in Project.tmCommand:
--------------------------------------------------------------------------------
1 |
2 |
3 |
19 | cd ~/Library/Application\ Support/TextMate/Bundles 20 | git clone git://github.com/protocool/ack-tmbundle.git Ack.tmbundle 21 |22 | 23 |
44 | # By Henrik Nyh (http://henrik.nyh.se) 2007-06-26 45 | # Free to modify and redistribute with credit. 46 | 47 | # Includes some minor modifications by Max (http://max.xaok.org/webtek) 2007-08-01 48 | # Adds search UI plus some minor modifications by Robert Thurnher (http://soup.robert42.com) 2007-08-11 49 | # Further modifications by Trevor Squires (http://somethinglearned.com) 2008-05-21 50 |51 | -------------------------------------------------------------------------------- /Support/ack-standalone.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | # 3 | # This standalone version of ack is generated code. 4 | # Please DO NOT EDIT or send patches for it. 5 | # 6 | 7 | use warnings; 8 | use strict; 9 | 10 | our $VERSION = '1.84'; 11 | # Check http://petdance.com/ack/ for updates 12 | 13 | # These are all our globals. 14 | 15 | 16 | MAIN: { 17 | if ( $App::Ack::VERSION ne $main::VERSION ) { 18 | App::Ack::die( "Program/library version mismatch\n\t$0 is $main::VERSION\n\t$INC{'App/Ack.pm'} is $App::Ack::VERSION" ); 19 | } 20 | 21 | # Do preliminary arg checking; 22 | my $env_is_usable = 1; 23 | for ( @ARGV ) { 24 | last if ( $_ eq '--' ); 25 | 26 | # Priorities! Get the --thpppt checking out of the way. 27 | /^--th[pt]+t+$/ && App::Ack::_thpppt($_); 28 | 29 | # See if we want to ignore the environment. (Don't tell Al Gore.) 30 | if ( $_ eq '--noenv' ) { 31 | my @keys = ( 'ACKRC', grep { /^ACK_/ } keys %ENV ); 32 | delete @ENV{@keys}; 33 | $env_is_usable = 0; 34 | } 35 | } 36 | unshift( @ARGV, App::Ack::read_ackrc() ) if $env_is_usable; 37 | App::Ack::load_colors(); 38 | 39 | if ( exists $ENV{ACK_SWITCHES} ) { 40 | App::Ack::warn( 'ACK_SWITCHES is no longer supported. Use ACK_OPTIONS.' ); 41 | } 42 | 43 | if ( !@ARGV ) { 44 | App::Ack::show_help(); 45 | exit 1; 46 | } 47 | 48 | main(); 49 | } 50 | 51 | sub main { 52 | my $opt = App::Ack::get_command_line_options(); 53 | 54 | $| = 1 if $opt->{flush}; # Unbuffer the output if flush mode 55 | 56 | if ( !-t STDIN && !eof(STDIN) ) { 57 | # We're going into filter mode 58 | for ( qw( f g l ) ) { 59 | $opt->{$_} and App::Ack::die( "Can't use -$_ when acting as a filter." ); 60 | } 61 | $opt->{show_filename} = 0; 62 | $opt->{regex} = App::Ack::build_regex( defined $opt->{regex} ? $opt->{regex} : shift @ARGV, $opt ); 63 | if ( my $nargs = @ARGV ) { 64 | my $s = $nargs == 1 ? '' : 's'; 65 | App::Ack::warn( "Ignoring $nargs argument$s on the command-line while acting as a filter." ); 66 | } 67 | App::Ack::search( \*STDIN, 0, '-', $opt ); 68 | exit 0; 69 | } 70 | 71 | my $file_matching = $opt->{f} || $opt->{lines}; 72 | if ( !$file_matching ) { 73 | @ARGV or App::Ack::die( 'No regular expression found.' ); 74 | $opt->{regex} = App::Ack::build_regex( defined $opt->{regex} ? $opt->{regex} : shift @ARGV, $opt ); 75 | } 76 | 77 | # check that all regexes do compile fine 78 | App::Ack::check_regex( $_ ) for ( $opt->{regex}, $opt->{G} ); 79 | 80 | my $what = App::Ack::get_starting_points( \@ARGV, $opt ); 81 | my $iter = App::Ack::get_iterator( $what, $opt ); 82 | App::Ack::filetype_setup(); 83 | 84 | App::Ack::set_up_pager( $opt->{pager} ) if defined $opt->{pager}; 85 | if ( $opt->{f} ) { 86 | App::Ack::print_files( $iter, $opt ); 87 | } 88 | elsif ( $opt->{l} || $opt->{count} ) { 89 | App::Ack::print_files_with_matches( $iter, $opt ); 90 | } 91 | else { 92 | App::Ack::print_matches( $iter, $opt ); 93 | } 94 | close $App::Ack::fh; 95 | exit 0; 96 | } 97 | 98 | =head1 NAME 99 | 100 | ack - grep-like text finder 101 | 102 | =head1 SYNOPSIS 103 | 104 | ack [options] PATTERN [FILE...] 105 | ack -f [options] [DIRECTORY...] 106 | 107 | =head1 DESCRIPTION 108 | 109 | Ack is designed as a replacement for 99% of the uses of F
#{scrub(escape(content))}| 45 | end 46 | 47 | def content_line(line, content) 48 | puts %Q|