]> ruderich.org/simon Gitweb - fcscs/fcscs.git/blobdiff - bin/fcscs
simplify $var->{..}->{..} to $var->{..}{..}
[fcscs/fcscs.git] / bin / fcscs
index e0a34f919fb61fde4c3016fa4e009228eb53038c..29499d2c82d7d65e95849348630d6704f0c84320 100755 (executable)
--- a/bin/fcscs
+++ b/bin/fcscs
@@ -54,6 +54,28 @@ None so far.
 
 =head1 USAGE
 
 
 =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"
 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<NOTE>: When yanking (copying) a temporary file is used to pass the data to
 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
 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:
 
 If no window appears, try running B<fcscs> 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.
     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;
         return { match => $matches->[0] };
     }
     $config->{state}{initial} = 0;
@@ -1089,7 +1110,7 @@ my %setting = (
 
 =over
 
 
 =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()>
 
 
 =item B<path> used by C<\&mapping_mode_path()>
 
@@ -1360,8 +1381,8 @@ RESULT:
             goto RESULT; # reprocess special entries in result
         }
         if (defined $result->{match}) {
             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';
             }
 
             debug \%config, 'input', 'running handler';
@@ -1369,7 +1390,7 @@ RESULT:
             # Choose handler with falling priority.
             my @handlers = (
                 $config{state}{handler},     # set by user
             # 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
             );
                 $result->{handler},          # set by mapping
                 $config{handler}{yank},      # fallback
             );