Changes between Version 1 and Version 2 of Ticket #2712, comment 4


Ignore:
Timestamp:
01/06/12 11:19:06 (13 years ago)
Author:
andrew_b
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2712, comment 4

    v1 v2  
    66 
    77[root@razorblade /]# tail -8 /etc/mc/cedit.menu  
     8{{{ 
    89#-------------------------- End of common section ----------------------------- 
    9  
    1010/       Comment / Uncomment 
    1111        declare -A cl=( ['c']='//' ['h']='//' ['pas']='//' ['sql']='--' ['lua']='--' ) 
    1212        c="${cl[%x]:-#}" 
    1313        read s < '%b' 
    14         [[ "${s:0:${#c}}" == "$c" ]] && e="s,!^$c,," || e="s,!^,$c," 
     14        [[ "${s:0:${#c}}" == "$c" ]] && e="s,^$c,," || e="s,^,$c," 
    1515        sed -i "$e" "%b" 
    16  
     16}}} 
    17172. Run mcedit somefile.txt 
    18183. Select block with F3, finishing selection with F3 again.