diff --git a/README.md b/README.md index ab0d2ce..5bb1432 100644 --- a/README.md +++ b/README.md @@ -31,42 +31,74 @@ This will save the executable to the working directory. ## Usage To open a file, run `tresor `. Alternatively, run just `tresor` and input the filename when prompted. +After entering your password, the KeePass database should open. -After inputting your password, the KeePass database should open. -Navigate using the `h`, `j`, `k` and `l` keys, type `:q` and hit Enter to exit. +Navigate using the `h`, `j`, `k` and `l` keys, type `:q` and hit `Enter` to exit. + +### Key bindings + +**Quick reference:** + +| Key | Action | +| --------- | ------------------------------------------------------- | +| `j` / `k` | Go up / down | +| `h` | Leave group or entry | +| `l` | Enter focused group or entry | +| `y` | Copy password of focused entry or field value | +| `d` | Delete focused field value | +| `u` | Undo last change | +| `C-r` | Redo change | +| `c` | Change title of focused entry or value of focused field | When hovering over an entry, press `y` to copy its password to the system clipboard. -After focusing an entry with `h` or Enter, you can select and copy specific fields (again using `y`). +After focusing an entry with `h` or `Enter`, you can select individual fields and copy their value (also using `y`). For encrypted values, the clipboard will be cleared automatically after ten seconds. -Commands work just like in vim: To execute a command, type `:` followed by the command and press Enter. +To delete a field, select it and press `d`. Some fields (i. e. title, username and password) are special: They won't be +deleted, instead their value will be set to an empty string. This is because KeePass considers these fields 'default +fields', and they should always be present for any given entry. + +Note that deleting entries or groups is not implemented yet. + +Entries can be renamed by pressing `c` and entering a new name. As with `y`, you can also change individual fields by +selecting them and pressing `c`. + +To undo any change, press `u`. To redo, press `C-r`. + +### Searching + +To search through the current group, type `/` (or `?` for backward search) followed by a query, and press `Enter`. +Cycle through matches using `n` and `N` for the next and last result, respectively. + +### Commands + +Commands work just like in vim: To execute a command, type `:` followed by the name of the command and optionally some +arguments; then, press `Enter`. These commands are currently available: -| Command | Action | -| ----------- | ----------------------------------------------------------------------- | -| `:q` | Quit without saving | -| `:w` | Save file. Specify path with `:w ` | -| `:wq`, `:x` | Save file and quit. Specifying the path works analogous to `:w` | -| `:e` | Reload current file (You will be prompted to enter your password again) | -| `:e ` | Load `` from disk | +| Command | Action | +| --------------------- | ----------------------------------------------------------------------- | +| `:q` | Quit without saving | +| `:w` | Save file. Specify path with `:w ` | +| `:wq`, `:x` | Save file and quit. Specifying the path works analogous to `:w` | +| `:e` | Reload current file (You will be prompted to enter your password again) | +| `:e ` | Load `` from disk | +| `:change ` | Set value of focused entry / field to `` (shortcut: `c`) | Note that currently, the `:w` command is pretty much useless, since editing entries is not supported, so it's not possible to actually make changes to a file. However, the last selected group is, in fact, stored and remembered when re-opening. -To search through the current group, type `/` (or `?` for backward search), followed by a query, and press Enter. -Cycle through matches using `n` and `N`. - ## Roadmap -This project is at a very early stage. Here is the short list of what is possible right now: +This project is at an early stage. Here is the list of what's possible right now: - Load and save `.kdbx` files of version 3.1 - Navigate groups and entries - Preview entries - Copy passwords to clipboard +- Editing entries (kind of) Some features planned for the future are: -- Editing entries - Fuzzy-finding - Creating new databases - Customization via config file (inculding color scheme)