]> git.eshelyaron.com Git - emacs.git/commitdiff
Examples of messages grep recognizes
authorJuri Linkov <juri@jurta.org>
Tue, 19 Jul 2005 12:57:56 +0000 (12:57 +0000)
committerJuri Linkov <juri@jurta.org>
Tue, 19 Jul 2005 12:57:56 +0000 (12:57 +0000)
etc/ChangeLog
etc/grep.txt [new file with mode: 0644]

index f4f2aa97feb5ef9b8540bf38e4f5e16d1b66cee8..8fdb699c50eb220b38f4c2818358cc413dc57575 100644 (file)
@@ -1,3 +1,7 @@
+2005-07-19  Juri Linkov  <juri@jurta.org>
+
+       * grep.txt: New file.
+
 2005-07-19  Jan Dj\e,Ad\e(Brv  <jan.h.d@swipnet.se>
 
        * PROBLEMS (Fedora Core 4 GNU/Linux: Segfault during dumping): 
diff --git a/etc/grep.txt b/etc/grep.txt
new file mode 100644 (file)
index 0000000..68d2f0c
--- /dev/null
@@ -0,0 +1,66 @@
+* Introduction  -*-grep-*-
+
+This shows the different kinds of messages grep recognizes by default and
+how they are rendered.  It is intended both to help you decide which matchers
+you need and as a test of the matchers.  Move the mouse over a colored part
+to see how much text was actually matched.
+
+Please do not edit this file in grep-mode, it may lose escape
+sequences on saving.  Visit this file literally for editing.
+
+
+* GNU grep 2.5.1
+
+grep -nH -e "INFO tree" ../info/*
+../info/dir:6:File: dir        Node: Top       This is the top of the INFO tree
+
+* GNU grep 2.5.1 with default colors
+
+grep -nH --color=always -e "INFO tree" ../info/*
+../info/dir:6:File: dir        Node: Top       This is the top of the \e[01;31mINFO tree\e[00m
+
+* GNU grep 2.5.1-cvs with specified minimal colors
+
+GREP_COLORS='mt=01;31:fn=:ln=:bn=:se=:ml=:cx=:ne' grep -nH --color=always -e "INFO tree" ../info/*
+../info/dir:6:File: dir        Node: Top       This is the top of the \e[01;31mINFO tree\e[m
+
+* GNU grep 2.5.1-cvs with default colors
+
+grep -nH --color=always -e "INFO tree" ../info/*
+\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
+
+* GNU grep 2.5.1 on files recognized as binary
+
+Binary file emacs-7 matches
+Binary file 2005-06 matches
+
+* GNU grep 2.5.1 on lines starting with a number and colon
+
+grep -nH -e "Universal Time" ../lispref/*
+../lispref/os.texi:1010:0:00 January 1, 1970 UTC (Coordinated \e[01;31mUniversal Time\e[00m)
+
+* GNU grep 2.5.1: other messages
+
+grep: ../info/dirinfo: No such file or directory
+Grep exited abnormally with code 2 at Tue Jul 19 15:42:32
+Grep finished with no matches found at Tue Jul 19 15:43:12
+Grep finished (matches found) at Tue Jul 19 15:45:15
+
+* agrep
+
+agrep -n "INFO tree" ../info/*
+../info/dir: 6: File: dir      Node: Top       This is the top of the INFO tree
+
+* unknown greps
+
+grep -nH -e "xyzxyz" ../info/*
+../info/emacs-2:1205:10:inserts `xyzxyzxyzxyz' in the current buffer.
+../info/emacs-2:1205:10-15:inserts `xyzxyzxyzxyz' in the current buffer.
+../info/emacs-2:1205.10-1205.15:inserts `xyzxyzxyzxyz' in the current buffer.
+../info/emacs-2 1205.10-15 inserts `xyzxyzxyzxyz' in the current buffer.
+../info/emacs-2 1205.10-1205.15 inserts `xyzxyzxyzxyz' in the current buffer.
+../info/emacs-2 1205 inserts `xyzxyzxyzxyz' in the current buffer.
+
+;;; Local Variables:
+;;; buffer-read-only: t
+;;; End: