Changeset 69c27e6 for t


Ignore:
Timestamp:
Sep 30, 2009, 1:02:36 AM (12 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
42ad917
Parents:
a3a9eb7
git-author:
David Benjamin <davidben@mit.edu> (09/23/09 01:07:46)
git-committer:
David Benjamin <davidben@mit.edu> (09/30/09 01:02:36)
Message:
Don't suggest repeated flags in complete_flags

For most commands, it doesn't make sense to provide an option twice, so
we avoid offering it again as a completion. Note: if the user happened
to pass the flag again, we'll still attempt to complete it.

To disable, use the repeat_flags keyword option. Tests update, with
complete_zwrite testing non-repeating and complete_word testing the old
behavior.

Signed-off-by: David Benjamin <davidben@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • t/completion.t

    re97c5d05 r69c27e6  
    204204
    205205test_complete('zwrite -c nelhage ', '',
    206               [qw(-n -C -m -c -i -r -O nelhage asedeno geofft)]);
     206              [qw(-n -C -m -i -r -O nelhage asedeno geofft)]);
    207207
    208208test_complete('zwrite -c nelhage ', '-',
    209               [qw(-n -C -m -c -i -r -O nelhage asedeno geofft)]);
     209              [qw(-n -C -m -i -r -O nelhage asedeno geofft)]);
    210210
    211211test_complete('zwrite -c nelhage -- ', '',
     
    219219                              "-d" => sub {qw(some words for completing)},
    220220                          },
    221                           sub {$_[1]});
     221                          sub {$_[1]},
     222                          repeat_flags => 1);
    222223}
    223224
Note: See TracChangeset for help on using the changeset viewer.