Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
johnzhuang666 committed May 11, 2018
1 parent d2d9d92 commit d1a2607
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
13 changes: 0 additions & 13 deletions .coveragerc

This file was deleted.

9 changes: 5 additions & 4 deletions minghu6/tools/pwd_keeper.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@

"""PwdKeeper
a small password keeper, query or add username-password by interactive
list #list all label
list (alias ls l) #list all label
query <label>
add <label> <username> <password>
del-account <label> <username-todel>
del-label <old-label> <new-label>
update-account <label> <username> <new-password>
update-label <old-label> <new-label>
q! #quit
q # quit
? # for help
Usage:
pwd_keeper <path> [--password=<master-pwd>] [--username=<username>]
Expand Down Expand Up @@ -142,7 +143,7 @@ def main(path, pwd, check_username=False, username=None):
interactive_help = split_blankline(__doc__)[0]
while True:
input_result = input(base_prompt).strip() # STRIP !!
if 'q!' in input_result:
if 'q' in input_result:
return

try:
Expand Down Expand Up @@ -199,7 +200,7 @@ def main(path, pwd, check_username=False, username=None):
_, old_label, new_label = split_whitespace(input_result)
pwd_keeper.update_label(old_label, new_label)

elif input_result.startswith('list'):
elif input_result.startswith('list') or input_result == 'ls' or input_result == 'l':
[color.print_info(label) for label in pwd_keeper.get_labels() if pwd_keeper]

elif input_result.startswith('?'):
Expand Down

0 comments on commit d1a2607

Please sign in to comment.