Commit Graph

2770 Commits

Author SHA1 Message Date
Dietmar Maurer 64b85116eb docs/administration-guide.rst: explain restore 2019-12-03 16:19:30 +01:00
Dietmar Maurer 5a499f3281 docs/administration-guide.rst: add encryption section 2019-12-03 15:24:04 +01:00
Wolfgang Bumiller a9aa52e6a8 test another api macro use
The api macro now supports hyphens in parameter names and
referencing externally defined `Schema`s, so here's an
example.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-12-03 13:41:40 +01:00
Christian Ebner de0aa53174 pxar: decoder: fix incorrect read for hardlinks.
Decoders read must check if the file is a hardlink and read data from the
corresponding offset if so.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-12-03 12:08:23 +01:00
Christian Ebner b7e18004a2 pxar: decoder: return original name in attributes()
The returned filename should be the one of the file given at the offset, not of
the one the hardlink points to.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-12-03 12:08:07 +01:00
Dietmar Maurer a129fdd9cc docs/administration-guide.rst: improve section "Creating Backups" 2019-12-03 11:59:00 +01:00
Dietmar Maurer a96521577e correctly install bash completion helpers 2019-12-03 09:52:53 +01:00
Dietmar Maurer 57905a61b1 docs/administration-guide.rst: improve section "Backup Content" 2019-12-03 09:04:49 +01:00
Dietmar Maurer 2938a0a788 docs/installation.rst: replace FIXME with todo items 2019-12-03 08:32:03 +01:00
Dietmar Maurer b10bf87117 docs/introduction.rst: improve "Why Backup" section. 2019-12-03 08:18:52 +01:00
Dietmar Maurer 7eea56ca00 use cli from proxmox::api 2019-12-02 11:56:29 +01:00
Dietmar Maurer 524b22df35 src/cli/completion.rs - get_help_completion: fix for "help -" expansion 2019-12-02 11:11:31 +01:00
Dietmar Maurer e8e9bae4d1 src/bin/completion.rs: add echo command 2019-12-02 11:04:40 +01:00
Dietmar Maurer 19d7a59236 src/bin/completion.rs: use api macros 2019-12-02 10:57:19 +01:00
Dietmar Maurer f9a51322cb src/cli/command.rs: use insert_help() 2019-12-02 08:52:08 +01:00
Dietmar Maurer e3e72546dd src/cli/command.rs: cleanup, remove unused top_def parameter 2019-12-02 08:47:03 +01:00
Dietmar Maurer 2348e77edf src/cli/completion.rs - get_simple_completion: remove all_arg_param parameters
Seems useless.
2019-12-02 08:31:03 +01:00
Dietmar Maurer 28c855c0a2 src/cli: improve docs 2019-12-01 16:41:49 +01:00
Dietmar Maurer 3bf920527c src/cli/command.rs: make set_help_context private - no need to expose 2019-12-01 12:54:41 +01:00
Dietmar Maurer bca6d9120a src/cli/command.rs: improve help command description 2019-12-01 12:40:37 +01:00
Dietmar Maurer 2f6ecc1ccd src/cli/completion.rs: moved all completion related code here 2019-12-01 11:44:31 +01:00
Dietmar Maurer a810e05288 src/cli/readline.rs: moved readline related code here 2019-12-01 11:31:35 +01:00
Dietmar Maurer 5d64a0d083 src/cli/shellword.rs: moved shellword related code into this file 2019-12-01 11:17:57 +01:00
Dietmar Maurer fb8a00bc00 src/cli/command.rs - get_nested_completion: allow fuzzy match 2019-12-01 11:06:54 +01:00
Dietmar Maurer 9498fcf9c5 src/cli/command.rs - get_nested_completion: return nothing if first argument does not match 2019-12-01 10:24:07 +01:00
Dietmar Maurer 309e449db2 src/cli/command.rs: improve get_help_completion 2019-12-01 10:18:47 +01:00
Dietmar Maurer d69fcf3080 tests/verify-api.rs: remove unused use clause 2019-12-01 09:51:05 +01:00
Dietmar Maurer b8a82922c7 src/cli/command.rs: handle multilevel sub commands in help 2019-12-01 09:42:51 +01:00
Dietmar Maurer b7bf71dfa1 src/cli/command.rs: fix help completions 2019-11-30 15:43:44 +01:00
Dietmar Maurer 7afc1af7ab src/bin/completion.rs: add history support 2019-11-30 15:08:37 +01:00
Dietmar Maurer 4b8573da65 src/cli/command.rs - handle_command: return Result instead of exit() 2019-11-30 15:08:00 +01:00
Dietmar Maurer 2b691daf6f src/cli.rs: add insert_help() method 2019-11-30 14:56:31 +01:00
Dietmar Maurer 1201abcffa src/cli/command.rs: implement help 2019-11-30 13:02:00 +01:00
Wolfgang Bumiller 8423c1fe64 cli/completion: use match statements and .contains()
`match` is a bit more readable than the if-else chains,
also replace
    space_chars.iter().any(|s| c == *s)
with
    space_chars.contains(&c)
which is also more readable.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-11-29 13:37:34 +01:00
Dietmar Maurer e399398444 remove shellwords crate 2019-11-29 12:49:44 +01:00
Dietmar Maurer ca60ac13d9 use rustyline to replace readline 2019-11-29 12:49:44 +01:00
Wolfgang Bumiller 41874331ed whitespace fixup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-11-29 09:52:15 +01:00
Wolfgang Bumiller 2905f2b5e6 update api macro example usage
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-11-29 09:51:27 +01:00
Dietmar Maurer 8b130e71da src/cli/command.rs: cleanup, make handlers more generic 2019-11-27 14:44:21 +01:00
Wolfgang Bumiller 7b6c41078b update api macro invocation to new style
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-11-27 14:19:46 +01:00
Christian Ebner 314bb35868 catalog_shell: fix several clippy warnings
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-11-27 10:13:50 +01:00
Wolfgang Bumiller 6486cb853f first api macro usage test/example
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-11-27 10:05:37 +01:00
Christian Ebner 951cf17ee3 catalog_shell: major refactoring of cli command definition and parsing
By changing the way shell commands are defined and parsed, this makes it more
straight forward to extend the current functionality.
The readline input is parsed based on the provided command definition and the
given parameters and options are passed to a command specific callback function.
In addition, the provided command definition including its description is used
to generate a help string to display.
The help command shows a list of all supported commands or the help string for
the provided command.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-11-26 13:01:00 +01:00
Christian Ebner 59bc6ad676 catalog_shell: check and return on empty list in order to avoid division by zero
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-11-26 12:55:33 +01:00
Christian Ebner 4e56b2f792 catalog_shell: do not restore full archive if no entries are selected for restore-selected
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-11-26 12:55:18 +01:00
Dietmar Maurer 12b4098660 src/cli/format.rs: move doc generation code into extra file 2019-11-26 12:12:53 +01:00
Dietmar Maurer 2f2b87e659 src/pxar/fuse.rs: add impl Context 2019-11-26 11:16:46 +01:00
Dietmar Maurer eedd1f95eb src/pxar/fuse.rs: move init and destroy into Session 2019-11-26 11:08:55 +01:00
Dietmar Maurer 970687c982 src/pxar/fuse.rs: cleanup - remove setup_session (moved into new) 2019-11-26 11:04:46 +01:00
Dietmar Maurer 2a11191072 src/pxar/fuse.rs: rename from_decoder into new, new into from_path 2019-11-26 10:56:41 +01:00