/todo

To get this branch, use:
bzr branch http://bzr.ed.am/todo

« back to all changes in this revision

Viewing changes to todo

  • Committer: edam
  • Date: 2012-01-31 15:05:35 UTC
  • Revision ID: edam@waxworlds.org-20120131150535-q0pe0kuvxun46kew
made section selection case insensitive and added short option (-s) for it

Show diffs side-by-side

added added

removed removed

25
25
    'a|all' => \$display_all,
26
26
    'e|edit' => \$mode_edit,
27
27
    'h|headers' => \$display_headers,
28
 
    'section=s' => \$display_section,
 
28
    's|section=s' => \$display_section,
29
29
    'help' => \$mode_help,
30
30
    'version' => \$mode_version,
31
31
) ) {
41
41
    "  -a, --all              display all sections\n".
42
42
    "  -e, --edit             edit your todo file\n".
43
43
    "  -h, --headers          show setion headers\n".
44
 
    "      --section=SECTION  display this named section\n".
 
44
    "  -s, --section=SECTION  display this named section\n".
45
45
    "      --help     display this help and exit\n".
46
46
    "      --version  output version information and exit\n";
47
47
    exit( 0 );
182
182
        display_line( $last_line, $section ) if( $last_line ne '' );
183
183
 
184
184
    # display line
185
 
        if( ( $section eq $display_section ) ||
 
185
        if( ( lc( $section ) eq lc( $display_section ) ) ||
186
186
                ( $section && $display_all ) )
187
187
        {
188
188
                $last_line = $_;