Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better error message in keepassxc-cli #1484

Closed
azzamsa opened this issue Feb 14, 2018 · 3 comments

Comments

Projects
None yet
4 participants
@azzamsa
Copy link

commented Feb 14, 2018

It will be nice if keepassxc-cli have better error message in wrong cli operation.
I keep trying

  • keepassxc-cli passname passdbfile
  • keepassxc-cli subgrup/passname passdbfile
  • keepassxc-cli root/subgrup/passname passdbfile

I don't realize that I don't put the argument in order, because keepassxc said 'file passname does not exists', it does not say that my argument order is wrong nor say that 'passname' is not passdb file.

Expected Behavior

Better error message in wrong argument order (or any other cli operation)

Current Behavior

Simple error massage

Possible Solution

Make better error message.

Steps to Reproduce (for bugs)

  1. keepassxc-cli passname passdbfile

Debug Info

KeePassXC - Version 2.2.4
Revision: 4723f66

Libraries:

  • Qt 5.7.1
  • libgcrypt 1.7.6-beta

Operating system: Debian GNU/Linux 9 (stretch)
CPU architecture: x86_64
Kernel: linux 4.9.0-4-amd64

Enabled extensions:

  • KeePassHTTP
  • Auto-Type
  • YubiKey

@phoerious phoerious added the wishlist label Feb 14, 2018

@droidmonkey droidmonkey changed the title Better error massage in keepassxc-cli Better error message in keepassxc-cli Feb 14, 2018

@louib louib added the plugin: CLI label Feb 14, 2018

@mkasberg

This comment has been minimized.

Copy link
Contributor

commented Feb 23, 2018

The current behavior looks pretty good to me, very typical for a cli interface. What is the proposed change?

Current behavior:

$ keepassxc-cli --version
2.2.4

$ keepassxc-cli foo ~/Passwords.kbdx 
Invalid command foo.
Usage: keepassxc-cli [options] command
KeePassXC command line interface.

Available commands:
  clip		Copy a password to the clipboard.
  extract	Extract and print the content of a database.
  entropy-meter	Calculate password entropy.
  list		List database entries.
  merge		Merge two databases.
  show		Show a password.

Options:
  -h, --help     Displays this help.
  -v, --version  Displays version information.

Arguments:
  command        Name of the command to execute.

$ keepassxc-cli foo/bar ~/Passwords.kbdx 
Invalid command foo/bar.
Usage: keepassxc-cli [options] command
KeePassXC command line interface.

Available commands:
  clip		Copy a password to the clipboard.
  extract	Extract and print the content of a database.
  entropy-meter	Calculate password entropy.
  list		List database entries.
  merge		Merge two databases.
  show		Show a password.

Options:
  -h, --help     Displays this help.
  -v, --version  Displays version information.

Arguments:
  command        Name of the command to execute.
@louib

This comment has been minimized.

Copy link
Member

commented Nov 10, 2018

@azzamsa thanks for the feedback. I believe #2465 will make it clear that the problem is with the first argument (the database file).

@louib louib closed this Nov 10, 2018

@azzamsa

This comment has been minimized.

Copy link
Author

commented Nov 10, 2018

Thank you for this.

Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.