|
Packit |
15a96c |
SEARCH_HISTORY (in Makefile)
|
|
Packit |
15a96c |
Version: 0.01
|
|
Packit |
15a96c |
|
|
Packit |
15a96c |
E-mail: filipg@paranoia.com (best)
|
|
Packit |
15a96c |
fmgst+@pitt.edu (so so)
|
|
Packit |
15a96c |
|
|
Packit |
15a96c |
----------------------------------------------------------------------------------
|
|
Packit |
15a96c |
|
|
Packit |
15a96c |
Intro:
|
|
Packit |
15a96c |
This patch adds the ability to search for words and phrases in
|
|
Packit |
15a96c |
the History buffer.
|
|
Packit |
15a96c |
|
|
Packit |
15a96c |
Do I
|
|
Packit |
15a96c |
Need
|
|
Packit |
15a96c |
It:
|
|
Packit |
15a96c |
If you use the "SCROLL MODE" (History Buffer) and wish to be able
|
|
Packit |
15a96c |
to search said buffer for words and phrases (case-less search is
|
|
Packit |
15a96c |
supported, but no regexp's!) then this patch is for you.
|
|
Packit |
15a96c |
|
|
Packit |
15a96c |
About
|
|
Packit |
15a96c |
History
|
|
Packit |
15a96c |
Buffer
|
|
Packit |
15a96c |
Search:
|
|
Packit |
15a96c |
The History Buffer is a circular buffer[+] of a preset number of
|
|
Packit |
15a96c |
lines that holds the contents of your previous 'screens'. I want
|
|
Packit |
15a96c |
to point out that this buffer is not a "carbon copy" of
|
|
Packit |
15a96c |
_everything_ that you have had on your screens. In fact, some
|
|
Packit |
15a96c |
programs can 'fool' minicom into not saving even one line of what
|
|
Packit |
15a96c |
was perhaps a dozen screen-fulls of information! (ie. lynx) Still,
|
|
Packit |
15a96c |
even with these problems, and the fact that a 5000 line buffer
|
|
Packit |
15a96c |
(maximum) increases the size of the minicom executable to several
|
|
Packit |
15a96c |
megabytes (!!), the history buffer is _very_ handy. I always wanted
|
|
Packit |
15a96c |
an ability to search this buffer (because 5000 lines is a lot of
|
|
Packit |
15a96c |
info to scan visually!) but could not wait any longer for _someone
|
|
Packit |
15a96c |
else_ to do it... so here we are :-)
|
|
Packit |
15a96c |
|
|
Packit |
15a96c |
Notice:
|
|
Packit |
15a96c |
To begin using this patch, you must ensure that your History Buffer
|
|
Packit |
15a96c |
is enabled in the Options screen. Enter minicom as usual and open
|
|
Packit |
15a96c |
up the Options screen with "C-A O". This will display a menu:
|
|
Packit |
15a96c |
|
|
Packit |
15a96c |
+=====[configuration]======+
|
|
Packit |
15a96c |
| Filenames and paths |
|
|
Packit |
15a96c |
| File transfer protocols |
|
|
Packit |
15a96c |
| Serial port setup |
|
|
Packit |
15a96c |
| Modem and dialing |
|
|
Packit |
15a96c |
| Screen and keyboard |< Select this option
|
|
Packit |
15a96c |
| Save setup as dfl |
|
|
Packit |
15a96c |
| Save setup as.. |
|
|
Packit |
15a96c |
| Exit |
|
|
Packit |
15a96c |
+==========================+
|
|
Packit |
15a96c |
|
|
Packit |
15a96c |
And a new menu will pop up:
|
|
Packit |
15a96c |
|
|
Packit |
15a96c |
+=================[Screen and keyboard]=================+
|
|
Packit |
15a96c |
| |
|
|
Packit |
15a96c |
| A - Command key is : ^A |
|
|
Packit |
15a96c |
| B - Backspace key sends : BS |
|
|
Packit |
15a96c |
| C - Status line is : enabled |
|
|
Packit |
15a96c |
| D - Alarm sound : No |
|
|
Packit |
15a96c |
| E - Foreground Color (menu): YELLOW |
|
|
Packit |
15a96c |
+=| F - Background Color (menu): BLUE |
|
|
Packit |
15a96c |
| | G - Foreground Color (term): CYAN |
|
|
Packit |
15a96c |
| | H - Background Color (term): BLACK |
|
|
Packit |
15a96c |
| | I - Foreground Color (stat): GREEN |
|
|
Packit |
15a96c |
| | J - Background Color (stat): BLACK |
|
|
Packit |
15a96c |
| | K - History Buffer Size : 2000 << << << |<<
|
|
Packit |
15a96c |
| | L - Macros file : .macros |
|
|
Packit |
15a96c |
| | M - Edit Macros |
|
|
Packit |
15a96c |
| | N - Macros enabled : Yes |
|
|
Packit |
15a96c |
+=| |
|
|
Packit |
15a96c |
| Change which setting? (Esc to exit) |
|
|
Packit |
15a96c |
+=======================================================+
|
|
Packit |
15a96c |
|
|
Packit |
15a96c |
The line you want to edit is marked with "<<"'s. Even though
|
|
Packit |
15a96c |
the default in minicom is 250 buffer lines, you may wish to
|
|
Packit |
15a96c |
increase it to something more reasonable. 2000 works for me.
|
|
Packit |
15a96c |
Hit ESC, and move to "Save setup as dfl" in the previous menu
|
|
Packit |
15a96c |
and select to save the current configuration.
|
|
Packit |
15a96c |
|
|
Packit |
15a96c |
Acti-
|
|
Packit |
15a96c |
vation:
|
|
Packit |
15a96c |
I assume that you have an _existing_ and configured version of
|
|
Packit |
15a96c |
minicom on your system. If not, please see the minicom man
|
|
Packit |
15a96c |
page and setup everything _first_!
|
|
Packit |
15a96c |
|
|
Packit |
15a96c |
Unless the "-D_SEARCH_HISTORY" option in the "OPFLAGS" in the
|
|
Packit |
15a96c |
Makefile was defined _before_ the current minicom you have was
|
|
Packit |
15a96c |
built, you will need to re-compile. Apply all the patches you
|
|
Packit |
15a96c |
want, edit the Makefile to active them (it's very simple), and
|
|
Packit |
15a96c |
type "make".
|
|
Packit |
15a96c |
|
|
Packit |
15a96c |
The minicom binary generated from the above compliation, will
|
|
Packit |
15a96c |
have all the necessary code to search the history buffer. If
|
|
Packit |
15a96c |
you do not plan to debug (there are no bugs :-).. you may wish
|
|
Packit |
15a96c |
to "strip minicom" to remove debugging info and make the file
|
|
Packit |
15a96c |
a bit smaller. This is optional.
|
|
Packit |
15a96c |
|
|
Packit |
15a96c |
Note:
|
|
Packit |
15a96c |
You can not search the history buffer until there is something
|
|
Packit |
15a96c |
in it. This means that you will need to connect to some service
|
|
Packit |
15a96c |
or BBS to actually test the searching function as nothing short
|
|
Packit |
15a96c |
that will add any lines to the History Buffer!
|
|
Packit |
15a96c |
|
|
Packit |
15a96c |
Status
|
|
Packit |
15a96c |
Line:
|
|
Packit |
15a96c |
If enabled (I suggest that you do it for a while), the status
|
|
Packit |
15a96c |
line is used to inform you of the allowed key-commands and other
|
|
Packit |
15a96c |
info. The typical status line for minicom looks like this:
|
|
Packit |
15a96c |
|
|
Packit |
15a96c |
CTRL-A Z for help |115200 8N1 | NOR | Minicom 1.75 1996 | VT102 | Online 03:37
|
|
Packit |
15a96c |
|
|
Packit |
15a96c |
When you enter the History Buffer view mode, using "C-A B", this
|
|
Packit |
15a96c |
status line will change to:
|
|
Packit |
15a96c |
|
|
Packit |
15a96c |
HISTORY: U=Up1 D=Down1 F=PgDn B=PgUp s=Srch S=CaseLess N=NextHit ESC=Exit
|
|
Packit |
15a96c |
|
|
Packit |
15a96c |
Where:
|
|
Packit |
15a96c |
|
|
Packit |
15a96c |
Letter Note Function & Notes
|
|
Packit |
15a96c |
====== ==== ===================================================
|
|
Packit |
15a96c |
U Move up one line
|
|
Packit |
15a96c |
D Move down one line
|
|
Packit |
15a96c |
F Move down one page (<SPACE> also works)
|
|
Packit |
15a96c |
B Move up one page
|
|
Packit |
15a96c |
s(or /) [+] Search (from beginning - oldest end - of buffer)
|
|
Packit |
15a96c |
for _exactly_ the pattern you can enter.
|
|
Packit |
15a96c |
Note: if you hear a <BEEP>, nothing was found!
|
|
Packit |
15a96c |
S(or \) [+] Search (from beginning - oldest end - of buffer)
|
|
Packit |
15a96c |
for the pattern you can enter _ignoring case_.
|
|
Packit |
15a96c |
Note: if you hear a <BEEP>, nothing was found!
|
|
Packit |
15a96c |
N Search for _next_ match (ie. continue search first
|
|
Packit |
15a96c |
initiated with either the \ or / command keys).
|
|
Packit |
15a96c |
<ESC> Exit from HISTORY mode back to the terminal session.
|
|
Packit |
15a96c |
|
|
Packit |
15a96c |
Note [+]:
|
|
Packit |
15a96c |
Both search commands will display another status line and enter
|
|
Packit |
15a96c |
the input mode:
|
|
Packit |
15a96c |
|
|
Packit |
15a96c |
SEARCH FOR (ESC=Exit)(nn):
|
|
Packit |
15a96c |
|
|
Packit |
15a96c |
Where you will be able to type in the word(s)/phrase to search
|
|
Packit |
15a96c |
for. The "(nn)" is the maximum number of characters (this can
|
|
Packit |
15a96c |
be changed in ../src/minicom.h as MAX_SEARCH (set to 30 by default))
|
|
Packit |
15a96c |
Note that hitting <ESC> will take you back to the HISTORY mode!
|
|
Packit |
15a96c |
|
|
Packit |
15a96c |
When you accept the entry, the display will be move to the first
|
|
Packit |
15a96c |
occurence of the search term. If none is found, you will just hear
|
|
Packit |
15a96c |
a <BEEP> (tone). Otherwise, the first match will be highlighted
|
|
Packit |
15a96c |
(and advanced to the top of the page)... other matches (if any)
|
|
Packit |
15a96c |
will also be high-lighted. You can now press "n" to advance to the
|
|
Packit |
15a96c |
next hit (if none are found from the current match to the end of
|
|
Packit |
15a96c |
the end of the document, you wee get a <BEEP> AND pressing 'n'
|
|
Packit |
15a96c |
again will wrap you around to the first match!). You can also
|
|
Packit |
15a96c |
use the page up/down and line up/down keys... any matches of
|
|
Packit |
15a96c |
the pattern that are encountered this way will ALSO be high-
|
|
Packit |
15a96c |
lighted.
|
|
Packit |
15a96c |
|
|
Packit |
15a96c |
Hitting <ESC> at any time will dismiss the HISTORY screen and
|
|
Packit |
15a96c |
restore the terminal session. If, for some reason, the screen is
|
|
Packit |
15a96c |
not correctly redrawn, hitting ^R (C-R) will refresh it.
|
|
Packit |
15a96c |
|
|
Packit |
15a96c |
Bugs:
|
|
Packit |
15a96c |
Minicom appears to have some windowing bugs that show themselves
|
|
Packit |
15a96c |
when the screen is not correctly restored when windows are closed.
|
|
Packit |
15a96c |
These bugs seem to occure more often when used with "odd" console
|
|
Packit |
15a96c |
screen sizes (I run 100x37 :-) and now and then I need to refresh
|
|
Packit |
15a96c |
the screen with ^R (C-R) after window-operations. I will track
|
|
Packit |
15a96c |
this down when I have some time... It's been in minicom as long as
|
|
Packit |
15a96c |
I can remember... it just never bothered me enough :-)
|
|
Packit |
15a96c |
|
|
Packit |
15a96c |
Feel free to e-mail me with suggestions and feedback:
|
|
Packit |
15a96c |
|
|
Packit |
15a96c |
E-mail: filipg@paranoia.com (best)
|
|
Packit |
15a96c |
fmgst+@pitt.edu (so so)
|
|
Packit |
15a96c |
|
|
Packit |
15a96c |
WWW: http://www.paranoia.com/~filipg/
|
|
Packit |
15a96c |
http://www.repairfaq.org/
|
|
Packit |
15a96c |
|
|
Packit |
15a96c |
----------------------------------------------------------------------------------
|
|
Packit |
15a96c |
|
|
Packit |
15a96c |
----------------
|
|
Packit |
15a96c |
// fmg 8/20/97 - Added History Buffer search (very unstable)
|
|
Packit |
15a96c |
Lots of bugs found and squashed... floor got
|
|
Packit |
15a96c |
really slippery for a while... yuck :-)
|
|
Packit |
15a96c |
|
|
Packit |
15a96c |
----------------
|
|
Packit |
15a96c |
// fmg 8/21/97 - Added case and case-less options and fixed 'N' search
|
|
Packit |
15a96c |
Started using this minicom as "production". 3 new bugs
|
|
Packit |
15a96c |
found and squashed.
|
|
Packit |
15a96c |
|
|
Packit |
15a96c |
----------------
|
|
Packit |
15a96c |
// fmg 8/22/97 - Rewrote parts of code, cleaned up variables, #ifdef'ed
|
|
Packit |
15a96c |
everything, and tested make'ing. Added display of
|
|
Packit |
15a96c |
compile options on startup screen. No bugs found.
|
|
Packit |
15a96c |
(sorry, does not mean there aren't any :-)
|
|
Packit |
15a96c |
|
|
Packit |
15a96c |
----------------
|
|
Packit |
15a96c |
// fmg 8/31/97 - Finished up and cleaned up this page :-)
|
|
Packit |
15a96c |
|