]> code.delx.au - gnu-emacs-elpa/blob - packages/ack/README.rst
Sync ack.el and pcmpl-ack.el to version 0.8
[gnu-emacs-elpa] / packages / ack / README.rst
1 ==========================================
2 Emacs Interface to command-line tool ack
3 ==========================================
4
5 From http://betterthangrep.com/
6
7 ack is a tool like grep, designed for programmers with large trees
8 of heterogeneous source code.
9
10 ack is written purely in Perl, and takes advantage of the power of
11 Perl's regular expressions.
12
13 This package is part of `GNU ELPA <http://elpa.gnu.org>`_.
14
15 Feature requests and bug reports are welcome. Thanks.
16
17 Features
18 --------
19
20 - Neither ``--nogroup`` nor ``--noheading`` is required
21 - Handle colors using the standard library ``ansi-color.el``
22 - Completion for ack options while reading from the minibuffer
23 - Support ``git grep``, ``hg grep`` and ``bzr grep``
24 - Support both emacs 23 and 24
25
26 Screenshots
27 -----------
28
29 .. figure:: http://i.imgur.com/mrk8k.png
30 :width: 400 px
31 :target: http://i.imgur.com/mrk8k.png
32 :alt: ack-git-grep.png
33
34 ``git --no-pager grep -n --color 'hg grep'``
35
36 .. figure:: http://i.imgur.com/a72Ap.png
37 :width: 400 px
38 :target: http://i.imgur.com/a72Ap.png
39 :alt: ack-emacs23-1.png
40
41 ``ack --column 'ack is.*tool'``
42
43 .. figure:: http://i.imgur.com/U2vFz.png
44 :width: 400 px
45 :target: http://i.imgur.com/U2vFz.png
46 :alt: ack-emacs23-2.png
47
48 ``ack --column --nogroup --nocolor 'ack is.*tool'``
49
50 Install
51 -------
52
53 Place ``ack.el`` in the ``load-path`` and add to your init file::
54
55 (require 'ack)
56
57 or::
58
59 (autoload 'ack "ack" nil t)
60
61 Completion (optional)
62 ~~~~~~~~~~~~~~~~~~~~~
63
64 Place ``pcmpl-ack.el`` in the ``load-path`` and add::
65
66 (autoload 'pcomplete/ack "pcmpl-ack")
67 (autoload 'pcomplete/ack-grep "pcmpl-ack")
68
69 to your init file. After this you will be able complete ``ack``
70 options while ``M-x ack`` or in shell/eshell.
71
72 Usage
73 -----
74
75 - ``M-x ack`` and provide a pattern to search.
76 - ``C-u M-x ack`` like ``M-x ack`` but allow you to select a
77 directory to search.
78
79 While reading ack command and args from the minibuffer, the following
80 key bindings may be useful:
81
82 - ``M-I`` => insert a template for case-insensitive file name search
83 - ``M-G`` => insert a template for ``git grep``, ``hg grep`` or ``bzr grep``
84 - ``TAB`` => completion for ack options
85
86 Bugs
87 ----
88
89 https://github.com/leoliu/ack-el/issues
90
91 Contributors
92 ------------
93 Phillip Lord