=head1 USAGE
+Short overview of the general usage, details below:
+
+ - start fcscs
+ - configure actions (optional)
+ - enable pasting
+ - ...
+ - select mode (optional, URL mode is used on startup):
+ - f: file paths
+ - u: URLs
+ - ...
+ - /: search mode
+ - for `normal' modes:
+ - select match by displayed number or <return> for lowest numbered
+ match
+ - configured action is run, e.g. URL is opened with browser
+ - for `search' mode:
+ - perform incremental search
+ - on <return> go to `normal' mode to select a match
+ - after the match is selected wait for confirmation or extension
+ - confirmation: <return> run previously selected action
+ - extension: change match, e.g. select complete word or line
+
GNU Screen setup (add to F<~/.screenrc>):
bind ^B eval "hardcopy $HOME/.tmp/screen-fcscs" "screen fcscs $HOME/.tmp/screen-fcscs"
change this.
I<NOTE>: When yanking (copying) a temporary file is used to pass the data to
-GNU screen/Tmux without exposing it to C<ps ux> or C<top>. However this may
+GNU screen/Tmux without exposing it to C<ps aux> or C<top>. However this may
leak data if those temporary files are written to disk. To prevent this change
-your C<$TMP> accordingly to point to a memory-only location or encrypted
-storage.
+your C<$TMP> to point to a memory-only location or encrypted storage.
If no window appears, try running B<fcscs> manually to catch the error message
and please report the bug:
fcscs /path/to/screen-or-tmux-fcscs-file
+
+=head1 MODES
+
=cut
}
+=head2 NORMAL MODES
+
+Normal modes select matches by calling a function which returns them, e.g. by
+using a regex.
+
+The following normal modes are available:
+
+=over 4
+
+=item B<path mode> select relative/absolute paths
+
+=item B<url mode> select URLs
+
+=back
+
+=cut
sub mapping_mode_path {
my ($key, $screen, $config, $input) = @_;
};
}
+=head2 SEARCH MODE (AND EXTEND MODE)
+
+Search mode is a special mode which lets you type a search string (a Perl
+regex) and then select one of the matches. Afterwards you can extend the
+match. For example select the complete word or to the end of the line. This
+allows quick selection of arbitrary text.
+
+The following mappings are available during the extension mode (not
+configurable at the moment):
+
+=over 4
+
+=item B<w> select current word
+
+=item B<b> extend word to the left
+
+=item B<e> extend word to the right
+
+=item B<W> select current WORD
+
+=item B<B> extend WORD to the left
+
+=item B<E> extend WORD to the right
+
+=item B<^> extend to beginning of line
+
+=item B<$> extend to end of line
+
+=back
+
+C<word> includes any characters matching C<\w+>, C<WORD> any non-whitespace
+characters (C<\S+>), just like in Vim.
+
+=cut
sub mapping_mode_search {
my ($key, $screen, $config, $input) = @_;
=over
-=item B<url> used by C<\&mapping_mode_url()>
+=item B<url> used by C<\&mapping_mode_url()>
=item B<path> used by C<\&mapping_mode_path()>