Skip to content

ideas for command line behavior #13

Description

@xorond

currently we have the following options for showing stuff in general: view, list, show, 'showall'

i'm thinking we can put all of this together in one command with positional arguments to make it more intuitive to use (passing flags would feel weird to regular users, constructing a sentence-like command structure would be more user-friendly i think).

i've done similar work on the add command, getting rid of the flags for '-c / --category' or '-d / --description' by replacing them with positional arguments so right now it's like this:

usage: surelock add [-h] [-f FILE]
                    [category] entry [username]
                    [description [description ...]]
surelock add: error: the following arguments are required: entry

an example:

./surelock.py add uni uspace my_uspace_username change this password every year for security
Type your passphrase: 
Retype your passphrase: 
Password for uspace:

and the result:

./surelock.py showall

Category: root
  Site: facebook        Username:                 Description: 
  Site: github          Username:                 Description: 
  Site: testsite        Username:                 Description: 
  Site: justanentry     Username:                 Description: 
Category: uni
  Site: uspace          Username: my_uspace_username Description: change this password every year for security
/surelock.py view uni uspace                                    
Type your passphrase: 
this is fake obviously

can we do this similarly for the view option, and make it the only option for viewing things in general? (single passwords, list of all entries in all categories like in showall, and just a list of all categories maybe with [n] next to them, indicating the number of items inside)

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions