1 * Introduction -*-grep-*- (See the end of file for copyright information)
3 This shows the different kinds of messages grep recognizes by default and
4 how they are rendered. It is intended both to help you decide which matchers
5 you need and as a test of the matchers. Move the mouse over a colored part
6 to see how much text was actually matched.
8 Please do not edit this file in grep-mode, it may lose escape
9 sequences on saving. Visit this file literally for editing.
14 grep -nH -e "INFO tree" ../info/*
15 ../info/dir:6:File: dir Node: Top This is the top of the INFO tree
17 * GNU grep 2.5.1 with default colors
19 grep -nH --color=always -e "INFO tree" ../info/*
20 ../info/dir:6:File: dir Node: Top This is the top of the
\e[01;31mINFO tree
\e[00m
22 * GNU grep 2.5.1-cvs with the specified matching color
24 GREP_COLORS='mt=01;31:fn=:ln=:bn=:se=:ml=:cx=:ne' grep -nH --color=always -e "INFO tree" ../info/*
25 ../info/dir:6:File: dir Node: Top This is the top of the
\e[01;31mINFO tree
\e[m
27 * GNU grep 2.5.1-cvs with colors for the file name, line number and match
29 GREP_COLORS='mt=01;31:fn=35:ln=32:bn=:se=:ml=36:cx=37:ne' grep -nH --color=always -e "INFO tree" ../info/*
30 \e[35m../info/dir
\e[m:
\e[32m6
\e[m:
\e[36mFile: dir Node: Top This is the top of the
\e[01;31mINFO tree
\e[m
31 \e[35m1
\e[m:
\e[32m2
\e[m:
\e[36m3:4:
\e[01;31mtext
\e[m
32 \e[35m1:2
\e[m:
\e[32m3
\e[m:
\e[36m4:
\e[01;31mtext
\e[m
33 \e[35m1:2:3
\e[m:
\e[32m4
\e[m:
\e[36m
\e[01;31mtext
\e[m
35 * GNU grep 2.5.1-cvs with default colors
37 grep -nH --color=always -e "INFO tree" ../info/*
38 \e[35m
\e[K../info/dir
\e[m
\e[K
\e[36m
\e[K:
\e[m
\e[K
\e[32m
\e[K6
\e[m
\e[K
\e[36m
\e[K:
\e[m
\e[KFile: dir Node: Top This is the top of the
\e[01;31m
\e[KINFO tree
\e[m
\e[K
40 * GNU grep 2.5.1 on lines starting with a number and colon
42 grep -nH -e "Universal Time" ../lispref/*
43 ../lispref/os.texi:1010:0:00 January 1, 1970 UTC (Coordinated
\e[01;31mUniversal Time
\e[00m)
45 * GNU grep 2.5.1 with context lines
47 grep -C 2 -nH --color=always -e "INFO tree" ../info/*
48 ../info/dir-4-looking at that node, which is (dir)Top.
50 ../info/dir:6:File: dir Node: Top This is the top of the
\e[01;31mINFO tree
\e[00m
52 ../info/dir-8-The Info Directory
54 * GNU grep 2.5.1 on files recognized as binary
56 Binary file emacs-7 matches
57 Binary file 2005-06 matches
59 * GNU grep 2.5.1: other messages
61 Grep started at Tue Jul 19 15:41:30
62 grep: ../info/dirinfo: No such file or directory
63 Grep interrupt at Tue Jul 19 15:42:31
64 Grep killed at Tue Jul 19 15:42:31
65 Grep terminated at Tue Jul 19 15:42:31
66 Grep exited abnormally with code 2 at Tue Jul 19 15:42:31
67 Grep finished with no matches found at Tue Jul 19 15:43:12
68 Grep finished (matches found) at Thu Jul 21 15:02:15
72 agrep -n "INFO tree" ../info/*
73 ../info/dir: 6: File: dir Node: Top This is the top of the INFO tree
75 * bzr grep with Bazaar plugin [grep]
77 bzr grep --color=always -in "org-element-map"
78 \e[35mlisp/org/org.el
\e[1;36m:
\e[0m21047
\e[1;36m:
\e[0m (
\e[1;31morg-element-map
\e[0m
81 with `[diff "el"] xfuncname = "^(\\(.*)$"' in .gitconfig
82 and `*.el diff=el' in .gitattributes
84 git --no-pager grep -inH -p -e "org-element-map"
85 lisp/org/org.el
\e[36m=
\e[m20969
\e[36m=
\e[m(defun org-fill-paragraph (&optional justify)
86 lisp/org/org.el
\e[36m:
\e[m21047
\e[36m:
\e[m (
\e[1;31morg-element-map
\e[m
90 grep -nH -e "xyzxyz" ../info/*
91 ../info/emacs-2:1205:10:inserts `xyzxyzxyzxyz' in the current buffer.
92 ../info/emacs-2:1205:10-15:inserts `xyzxyzxyzxyz' in the current buffer.
93 ../info/emacs-2:1205.10-1205.15:inserts `xyzxyzxyzxyz' in the current buffer.
94 ../info/emacs-2 1205.10-15 inserts `xyzxyzxyzxyz' in the current buffer.
95 ../info/emacs-2 1205.10-1205.15 inserts `xyzxyzxyzxyz' in the current buffer.
96 ../info/emacs-2 1205 inserts `xyzxyzxyzxyz' in the current buffer.
100 Copyright (C) 2005-2014 Free Software Foundation, Inc.
104 This document is free software: you can redistribute it and/or modify
105 it under the terms of the GNU General Public License as published by
106 the Free Software Foundation, either version 3 of the License, or
107 (at your option) any later version.
109 This program is distributed in the hope that it will be useful,
110 but WITHOUT ANY WARRANTY; without even the implied warranty of
111 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
112 GNU General Public License for more details.
114 You should have received a copy of the GNU General Public License
115 along with this program. If not, see <http://www.gnu.org/licenses/>.
119 ;;; eval: (let ((inhibit-read-only t) (compilation-filter-start (point-min))) (save-excursion (goto-char (point-max)) (grep-filter) (set-buffer-modified-p nil)))
120 ;;; buffer-read-only: t