X-Git-Url: https://ruderich.org/simon/gitweb/?p=fcscs%2Ffcscs.git;a=blobdiff_plain;f=bin%2Ffcscs;h=29499d2c82d7d65e95849348630d6704f0c84320;hp=e0a34f919fb61fde4c3016fa4e009228eb53038c;hb=f281258f296e07d235c8478e251fd5f373f07e26;hpb=ca3226462a913d57321b09ba7a13a955f39fc1c4 diff --git a/bin/fcscs b/bin/fcscs index e0a34f9..29499d2 100755 --- a/bin/fcscs +++ b/bin/fcscs @@ -54,6 +54,28 @@ None so far. =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 for lowest numbered + match + - configured action is run, e.g. URL is opened with browser + - for `search' mode: + - perform incremental search + - on go to `normal' mode to select a match + - after the match is selected wait for confirmation or extension + - confirmation: 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" @@ -87,10 +109,9 @@ explained below. Per default URLs are selected, see options for a way to change this. I: When yanking (copying) a temporary file is used to pass the data to -GNU screen/Tmux without exposing it to C or C. However this may +GNU screen/Tmux without exposing it to C or C. 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 manually to catch the error message and please report the bug: @@ -492,7 +513,7 @@ sub select_match { return if @{$matches} == 0; # Don't return on initial run to give the user a chance to select another # mode, e.g. to switch from URL selection to search selection. - if (@{$matches} == 1 and not $config->{state}->{initial}) { + if (@{$matches} == 1 and not $config->{state}{initial}) { return { match => $matches->[0] }; } $config->{state}{initial} = 0; @@ -1089,7 +1110,7 @@ my %setting = ( =over -=item B used by C<\&mapping_mode_url()> +=item B used by C<\&mapping_mode_url()> =item B used by C<\&mapping_mode_path()> @@ -1360,8 +1381,8 @@ RESULT: goto RESULT; # reprocess special entries in result } if (defined $result->{match}) { - if (not defined $result->{match}->{value}) { - $result->{match}->{value} = $result->{match}->{string}; + if (not defined $result->{match}{value}) { + $result->{match}{value} = $result->{match}{string}; } debug \%config, 'input', 'running handler'; @@ -1369,7 +1390,7 @@ RESULT: # Choose handler with falling priority. my @handlers = ( $config{state}{handler}, # set by user - $result->{match}->{handler}, # set by match + $result->{match}{handler}, # set by match $result->{handler}, # set by mapping $config{handler}{yank}, # fallback );