3
3
# this extension implements scrollback buffer search
5
#:META:X_RESOURCE:%:string:activation hotkey keysym
9
searchable-scrollback<hotkey> - incremental scrollback search (enabled by default)
13
Adds regex search functionality to the scrollback buffer, triggered
14
by a hotkey (default: C<M-s>). While in search mode, normal terminal
15
input/output is suspended and a regex is displayed at the bottom of the
18
Inputting characters appends them to the regex and continues incremental
19
search. C<BackSpace> removes a character from the regex, C<Up> and C<Down>
20
search upwards/downwards in the scrollback buffer, C<End> jumps to the
21
bottom. C<Escape> leaves search mode and returns to the point where search
22
was started, while C<Enter> or C<Return> stay at the current position and
23
additionally stores the first match in the current line into the primary
24
selection if the C<Shift> modifier is active.
26
The regex defaults to "(?i)", resulting in a case-insensitive search. To
27
get a case-sensitive search you can delete this prefix using C<BackSpace>
28
or simply use an uppercase character which removes the "(?i)" prefix.
30
See L<perlre> for more info about perl regular expression syntax.
8
37
my $hotkey = $self->{argv}[0]
9
|| $self->x_resource ("searchable-scrollback")
38
|| $self->x_resource ("%")
12
41
$self->parse_keysym ($hotkey, "perl:searchable-scrollback:start")