Ticket #3742: 0001-Ticket-3681-and-3742.patch

File 0001-Ticket-3681-and-3742.patch, 10.2 KB (added by mc-hobbit, 3 years ago)

Patch for tickets 3681 and 3742

  • misc/mc.ext.in

    From 321a176ad7a80402c244e8194c999ae8de126f07 Mon Sep 17 00:00:00 2001
    From: Brian Lowe <mc-hobbit@groupbcl.ca>
    Date: Sat, 14 Jan 2017 20:18:03 -0600
    Subject: [PATCH] Tickets #3681 and #3742
    
    Ticket #3681: Document when changes to mc.ext take effect.
    Ticket #3742: Update comment block at the start of the file.
    
    Signed-off-by: Brian Lowe <mc-hobbit@groupbcl.ca>
    ---
     misc/mc.ext.in | 207 +++++++++++++++++++++++++++++++++------------------------
     1 file changed, 119 insertions(+), 88 deletions(-)
    
    diff --git a/misc/mc.ext.in b/misc/mc.ext.in
    index 92f908b..a14a984 100644
    a b  
    1 # Midnight Commander 3.0 extension file 
    2 # Warning: Structure of this file has changed completely with version 3.0 
     1# Midnight Commander extension file 
     2# 
     3# Empty lines and lines starting with "#" are ignored. 
     4# 
     5# IMPORTANT: mc scans this file only at startup or after updating it using the 
     6# mc "Edit extension file" command (F9-c-e). If you edit the file otherwise 
     7# while mc is running, you will need to (F9-c-e) and exit the editor for your 
     8# changes to take effect, or exit mc and restart. 
    39# 
    4 # All lines starting with # or empty lines are thrown away. 
    510# Lines starting in the first column should have following format: 
    611# 
    7 # keyword/descNL, i.e. everything after keyword/ until new line is desc 
     12#   KEYWORD/DESC<NL> (i.e. everything after "KEYWORD/" until newline is "DESC") 
    813# 
    9 # keyword can be: 
     14# KEYWORD is one of the following: 
    1015# 
    11 #    shell (desc is, when starting with a dot, any extension (no wildcars), 
    12 #          i.e. matches all the files *desc . Example: .tar matches *.tar; 
    13 #          if it doesn't start with a dot, it matches only a file of that name) 
     16#    shell 
     17#       DESC is, when starting with a dot, an extension (no wildcards.) 
     18#       All the files matching '*DESC'. Example: .tar matches *.tar; if it 
     19#       doesn't start with a dot, it matches only a file of that name. 
    1420# 
    15 #    shell/i (desc is, when starting with a dot, any extension (no wildcars), 
    16 #          The same as shell but with case insensitive. 
     21#    shell/i 
     22#       DESC is, when starting with a dot, an extension (no wildcards.) 
     23#       The same as "shell" but case-insensitive. 
    1724# 
    18 #    regex (desc is an extended regular expression) 
    19 #          Please note that we are using the GNU regex library and thus 
    20 #          \| matches the literal | and | has special meaning (or) and 
    21 #          () have special meaning and \( \) stand for literal ( ). 
     25#    regex 
     26#       DESC is an extended regular expression. 
     27#       Note that mc uses the GNU regex library and thus: 
     28#         | has a special meaning ("or") and \| matches the literal | 
     29#         () have special meaning and \( \) stand for literal ( ) 
    2230# 
    23 #    regex/i (desc is an extended regular expression) 
    24 #          The same as regex but with case insensitive. 
     31#    regex/i 
     32#       DESC is an extended regular expression. 
     33#       The same as "regex" but case-insensitive. 
    2534# 
    26 #    type  (file matches this if `file %f` matches regular expression desc 
    27 #          (the filename: part from `file %f` is removed)) 
     35#    type 
     36#       File matches this if `file %f` matches regular expression DESC 
     37#       (the 'filename:' text from `file %f` is removed) 
    2838# 
    29 #    type/i (file matches this if `file %f` matches regular expression desc) 
    30 #          The same as type but with case insensitive. 
     39#    type/i 
     40#       File matches this if `file %f` matches regular expression DESC 
     41#       The same as "type" but case-insensitive. 
    3142# 
    32 #    directory (matches any directory matching regular expression desc) 
     43#    directory 
     44#       Matches any directory matching regular expression DESC 
    3345# 
    34 #    include (matches an include directive) 
     46#    include 
     47#       Matches an 'include' directive 
    3548# 
    36 #    default (matches any file no matter what desc is) 
     49#    default 
     50#       Matches any file regardless of the value of DESC 
    3751# 
    3852# Other lines should start with a space or tab and should be in the format: 
    3953# 
    40 # keyword=commandNL (with no spaces around =), where keyword should be: 
    41 # 
    42 #    Open (if the user presses Enter or doubleclicks it), 
    43 # 
    44 #    View (F3), Edit (F4) 
    45 # 
    46 #    Include is the keyword used to add any further entries from an include/ 
    47 #    section 
    48 # 
    49 # command is any one-line shell command, with the following substitutions: 
    50 # 
    51 # %% -> % character 
    52 # %p -> name of the current file (without path, but pwd is its path). 
    53 #       Also provided to external application as MC_EXT_BASENAME 
    54 #       global variable 
    55 # %f -> name of the current file. Unlike %p, if file is located on a 
    56 #       non-local virtual filesystem, i.e. either tarfs or ftpfs, 
    57 #       then the file will be temporarily copied into a local directory 
    58 #       and %f will be the full path to this local temporal file. 
    59 #       If you don't want to get a local copy and want to get the 
    60 #       virtual fs path (like /#ftp:ftp.cvut.cz/pub/hungry/xword), then 
    61 #       use %d/%p instead of %f. 
    62 #       Also provided to external application as MC_EXT_FILENAME 
    63 #       global variable 
    64 # %d -> name of the current directory (pwd, without trailing slash) 
    65 #       Also provided to external application as MC_EXT_CURRENTDIR 
    66 #       global variable 
    67 # %s -> "selected files", i.e. space separated list of tagged files if any 
    68 #       or name of the current file. 
    69 #       Also provided to external application as MC_EXT_SELECTED 
    70 #       global variable 
    71 # %t -> list of tagged files 
    72 #       Also provided to external application as MC_EXT_ONLYTAGGED 
    73 #       global variable 
    74 # %u -> list of tagged files (they'll be untaged after the command) 
    75 # 
    76 # (If these 6 letters are in uppercase, they refer to the other panel. 
    77 # But you shouldn't have to use it in this file.) 
    78 # 
    79 # 
    80 # %cd -> the rest is a path mc should change into (cd won't work, since it's 
    81 #       a child process).  %cd handles even vfs names. 
    82 # 
    83 # %view -> the command you type will be piped into mc's internal file viewer 
    84 #       if you type only the %view and no command, viewer will load %f file 
    85 #       instead (i.e. no piping, so it is different to %view cat %f) 
    86 #       %view may be directly followed by {} with a list of any of 
    87 #       ascii (Ascii mode), hex (Hex mode), nroff (color highlighting for 
    88 #       text using backspace for bold and underscore) and unform 
    89 #       (no highlighting for nroff sequences) separated by commas. 
    90 # 
    91 # %var -> You use it like this: %var{VAR:default}.  This macro will expand 
    92 #       to the value of the VAR variable in the environment if it's set 
    93 #       otherwise the value in default will be used.  This is similar to 
    94 #       the Bourne shell ${VAR-default} construct. 
    95 # 
    96 # Rules are applied from top to bottom, thus the order is important. 
    97 # If some actions are missing, search continues as if this target didn't 
    98 # match (i.e. if a file matches the first and second entry and View action 
    99 # is missing in the first one, then on pressing F3 the View action from 
    100 # the second entry will be used. default should catch all the actions. 
    101 # 
    102 # Any new entries you develop for you are always welcome if they are 
    103 # useful on more than one system.  You can post your modifications 
    104 # as tickets at www.midnight-commander.org 
     54#       KEYWORD=COMMAND<NL> (with no spaces around =) 
     55# 
     56# KEYWORD is one of the # following: 
     57# 
     58#    Open 
     59#       COMMAND is run if the user presses Enter or double-clicks the file 
     60# 
     61#    View 
     62#       COMMAND is run if the user presses F3 
     63# 
     64#    Edit 
     65#       COMMAND is run if the user presses F4 
     66# 
     67#    Include 
     68#       Add any further entries from an 'include/' section 
     69# 
     70# COMMAND is any one-line shell command, with the following substitutions: 
     71# 
     72#    %% 
     73#       The '%' character 
     74# 
     75#    %p or $MC_EXT_BASENAME 
     76#       Name of the current file (without path, but 'pwd' is its path.) 
     77# 
     78#    %f or $MC_EXT_FILENAME 
     79#       Name of the current file. Unlike %p, if file is located on a non-local 
     80#       virtual filesystem (e.g. tarfs or ftpfs,) then the file will be 
     81#       temporarily copied into a local directory and %f will be the full path 
     82#       to this local temporal file.  If you don't want to get a local copy and 
     83#       want to get the virtual fs path (like ftp://ftp.cvut.cz/pub/linux),  
     84#       then use %d/%p instead of %f. 
     85# 
     86#    %d or $MC_EXT_CURRENTDIR 
     87#       Name of the current directory (pwd, without trailing slash) 
     88# 
     89#    %s or $MC_EXT_SELECTED 
     90#       Space separated list of tagged files (if any) or the name of the 
     91#       current file. 
     92# 
     93#    %t or $MC_EXT_ONLYTAGGED 
     94#       Space-spearted list of tagged files 
     95# 
     96#    %u 
     97#       list of tagged files; untagged after command completes 
     98# 
     99#    (If the letter following the % in the above six lines is in uppercase, it 
     100#    refers to the other panel.  But you shouldn't have to use it in this 
     101#    file.) 
     102# 
     103#    %cd PATH 
     104#       PATH that mc should change into ("cd" won't work because it's a child 
     105#       process.)  %cd handles even vfs names. 
     106# 
     107#    %view 
     108#       Output from COMMAND will be piped into mc's internal file viewer.  If 
     109#       you type only '%view' and no COMMAND, viewer will directly load the %f 
     110#       file without piping.  The result is the same as if COMMAND was "%view 
     111#       cat %f," but without the need to fork a shell, run 'cat', and read its 
     112#       output. 
     113# 
     114#       %view may be directly followed by {} with one or more of the following 
     115#       separated by commas: 
     116#         ascii  (ascii mode) 
     117#         hex    (hex mode) 
     118#         nroff  (colour highlighting for text using char<backspace>char 
     119#                for bold and <underscore><backspace>char for underscore) 
     120#         unform (no highlighting for nroff sequences) 
     121# 
     122#    %var{VARNAME:default} 
     123#       Expands to the value of the VARNAME variable in the environment if it's 
     124#       set, otherwise the value in "default" is used. This is similar to the 
     125#       Bourne shell ${VAR-default} construct. 
     126# 
     127# Rules are applied from top to bottom, thus the order is important.  If some 
     128# actions are missing, search continues as if this target didn't match (i.e. if 
     129# a file matches the first and second entry and View action is missing in the 
     130# first one, then on pressing F3 the View action from the second entry will be 
     131# used.) 
     132# 
     133# Any new entries you develop for you are always welcome if they are useful 
     134# on more than one system.  You can post your modifications as tickets at 
     135# www.midnight-commander.org 
    105136 
    106137 
    107138### Changes ###