Debian Codegraph @

doc/HistSearch

raw
1 SEARCH_HISTORY (in Makefile)
2 Version: 0.01
3
4 E-mail: [email protected] (best)
5 [email protected] (so so)
6
7 ----------------------------------------------------------------------------------
8
9 Intro:
10 This patch adds the ability to search for words and phrases in
11 the History buffer.
12
13 Do I
14 Need
15 It:
16 If you use the "SCROLL MODE" (History Buffer) and wish to be able
17 to search said buffer for words and phrases (case-less search is
18 supported, but no regexp's!) then this patch is for you.
19
20 About
21 History
22 Buffer
23 Search:
24 The History Buffer is a circular buffer[+] of a preset number of
25 lines that holds the contents of your previous 'screens'. I want
26 to point out that this buffer is not a "carbon copy" of
27 _everything_ that you have had on your screens. In fact, some
28 programs can 'fool' minicom into not saving even one line of what
29 was perhaps a dozen screen-fulls of information! (ie. lynx) Still,
30 even with these problems, and the fact that a 5000 line buffer
31 (maximum) increases the size of the minicom executable to several
32 megabytes (!!), the history buffer is _very_ handy. I always wanted
33 an ability to search this buffer (because 5000 lines is a lot of
34 info to scan visually!) but could not wait any longer for _someone
35 else_ to do it... so here we are :-)
36
37 Notice:
38 To begin using this patch, you must ensure that your History Buffer
39 is enabled in the Options screen. Enter minicom as usual and open
40 up the Options screen with "C-A O". This will display a menu:
41
42 +=====[configuration]======+
43 | Filenames and paths |
44 | File transfer protocols |
45 | Serial port setup |
46 | Modem and dialing |
47 | Screen and keyboard |< Select this option
48 | Save setup as dfl |
49 | Save setup as.. |
50 | Exit |
51 +==========================+
52
53 And a new menu will pop up:
54
55 +=================[Screen and keyboard]=================+
56 | |
57 | A - Command key is : ^A |
58 | B - Backspace key sends : BS |
59 | C - Status line is : enabled |
60 | D - Alarm sound : No |
61 | E - Foreground Color (menu): YELLOW |
62 +=| F - Background Color (menu): BLUE |
63 | | G - Foreground Color (term): CYAN |
64 | | H - Background Color (term): BLACK |
65 | | I - Foreground Color (stat): GREEN |
66 | | J - Background Color (stat): BLACK |
67 | | K - History Buffer Size : 2000 << << << |<<
68 | | L - Macros file : .macros |
69 | | M - Edit Macros |
70 | | N - Macros enabled : Yes |
71 +=| |
72 | Change which setting? (Esc to exit) |
73 +=======================================================+
74
75 The line you want to edit is marked with "<<"'s. Even though
76 the default in minicom is 250 buffer lines, you may wish to
77 increase it to something more reasonable. 2000 works for me.
78 Hit ESC, and move to "Save setup as dfl" in the previous menu
79 and select to save the current configuration.
80
81 Acti-
82 vation:
83 I assume that you have an _existing_ and configured version of
84 minicom on your system. If not, please see the minicom man
85 page and setup everything _first_!
86
87 Unless the "-D_SEARCH_HISTORY" option in the "OPFLAGS" in the
88 Makefile was defined _before_ the current minicom you have was
89 built, you will need to re-compile. Apply all the patches you
90 want, edit the Makefile to active them (it's very simple), and
91 type "make".
92
93 The minicom binary generated from the above compliation, will
94 have all the necessary code to search the history buffer. If
95 you do not plan to debug (there are no bugs :-).. you may wish
96 to "strip minicom" to remove debugging info and make the file
97 a bit smaller. This is optional.
98
99 Note:
100 You can not search the history buffer until there is something
101 in it. This means that you will need to connect to some service
102 or BBS to actually test the searching function as nothing short
103 that will add any lines to the History Buffer!
104
105 Status
106 Line:
107 If enabled (I suggest that you do it for a while), the status
108 line is used to inform you of the allowed key-commands and other
109 info. The typical status line for minicom looks like this:
110
111 CTRL-A Z for help |115200 8N1 | NOR | Minicom 1.75 1996 | VT102 | Online 03:37
112
113 When you enter the History Buffer view mode, using "C-A B", this
114 status line will change to:
115
116 HISTORY: U=Up1 D=Down1 F=PgDn B=PgUp s=Srch S=CaseLess N=NextHit ESC=Exit
117
118 Where:
119
120 Letter Note Function & Notes
121 ====== ==== ===================================================
122 U Move up one line
123 D Move down one line
124 F Move down one page (<SPACE> also works)
125 B Move up one page
126 s(or /) [+] Search (from beginning - oldest end - of buffer)
127 for _exactly_ the pattern you can enter.
128 Note: if you hear a <BEEP>, nothing was found!
129 S(or \) [+] Search (from beginning - oldest end - of buffer)
130 for the pattern you can enter _ignoring case_.
131 Note: if you hear a <BEEP>, nothing was found!
132 N Search for _next_ match (ie. continue search first
133 initiated with either the \ or / command keys).
134 <ESC> Exit from HISTORY mode back to the terminal session.
135
136 Note [+]:
137 Both search commands will display another status line and enter
138 the input mode:
139
140 SEARCH FOR (ESC=Exit)(nn):
141
142 Where you will be able to type in the word(s)/phrase to search
143 for. The "(nn)" is the maximum number of characters (this can
144 be changed in ../src/minicom.h as MAX_SEARCH (set to 30 by default))
145 Note that hitting <ESC> will take you back to the HISTORY mode!
146
147 When you accept the entry, the display will be move to the first
148 occurence of the search term. If none is found, you will just hear
149 a <BEEP> (tone). Otherwise, the first match will be highlighted
150 (and advanced to the top of the page)... other matches (if any)
151 will also be high-lighted. You can now press "n" to advance to the
152 next hit (if none are found from the current match to the end of
153 the end of the document, you wee get a <BEEP> AND pressing 'n'
154 again will wrap you around to the first match!). You can also
155 use the page up/down and line up/down keys... any matches of
156 the pattern that are encountered this way will ALSO be high-
157 lighted.
158
159 Hitting <ESC> at any time will dismiss the HISTORY screen and
160 restore the terminal session. If, for some reason, the screen is
161 not correctly redrawn, hitting ^R (C-R) will refresh it.
162
163 Bugs:
164 Minicom appears to have some windowing bugs that show themselves
165 when the screen is not correctly restored when windows are closed.
166 These bugs seem to occure more often when used with "odd" console
167 screen sizes (I run 100x37 :-) and now and then I need to refresh
168 the screen with ^R (C-R) after window-operations. I will track
169 this down when I have some time... It's been in minicom as long as
170 I can remember... it just never bothered me enough :-)
171
172 Feel free to e-mail me with suggestions and feedback:
173
174 E-mail: [email protected] (best)
175 [email protected] (so so)
176
177 WWW: http://www.paranoia.com/~filipg/
178 http://www.repairfaq.org/
179
180 ----------------------------------------------------------------------------------
181
182 ----------------
183 // fmg 8/20/97 - Added History Buffer search (very unstable)
184 Lots of bugs found and squashed... floor got
185 really slippery for a while... yuck :-)
186
187 ----------------
188 // fmg 8/21/97 - Added case and case-less options and fixed 'N' search
189 Started using this minicom as "production". 3 new bugs
190 found and squashed.
191
192 ----------------
193 // fmg 8/22/97 - Rewrote parts of code, cleaned up variables, #ifdef'ed
194 everything, and tested make'ing. Added display of
195 compile options on startup screen. No bugs found.
196 (sorry, does not mean there aren't any :-)
197
198 ----------------
199 // fmg 8/31/97 - Finished up and cleaned up this page :-)
200