Sun, 05 Apr 2020 10:13:09 +0200
cmd_edit: fixes wrong return code if the user did not change the file
714
10a5d6ce0906
adds documentation for the edit command
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
1 | --- |
10a5d6ce0906
adds documentation for the edit command
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
2 | title: 'dav edit' |
10a5d6ce0906
adds documentation for the edit command
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
3 | --- |
10a5d6ce0906
adds documentation for the edit command
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
4 | |
10a5d6ce0906
adds documentation for the edit command
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
5 | **`dav edit [-pc] [-k <key>] [-V <version>] <url>`** |
10a5d6ce0906
adds documentation for the edit command
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
6 | |
10a5d6ce0906
adds documentation for the edit command
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
7 | Downloads a resources and opens an editor. If there is no resource at the |
10a5d6ce0906
adds documentation for the edit command
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
8 | specified location, it is attempted to create a fresh resource. |
10a5d6ce0906
adds documentation for the edit command
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
9 | The resource is downloaded to a temporary file and re-uploaded only if you save |
10a5d6ce0906
adds documentation for the edit command
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
10 | any changes to that file. |
10a5d6ce0906
adds documentation for the edit command
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
11 | |
10a5d6ce0906
adds documentation for the edit command
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
12 | The default editor `vi` can be changed with the `EDITOR` environment variable. |
10a5d6ce0906
adds documentation for the edit command
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
13 | |
10a5d6ce0906
adds documentation for the edit command
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
14 | This command transparently handles decryption and encryption. If you download |
10a5d6ce0906
adds documentation for the edit command
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
15 | and open a plain text file and request content encryption (either by config or |
10a5d6ce0906
adds documentation for the edit command
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
16 | by command line option) the file will be re-uploaded with content encryption. |
10a5d6ce0906
adds documentation for the edit command
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
17 | However, a present file will keep its (plain text) file name in any case. |
10a5d6ce0906
adds documentation for the edit command
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
18 | |
10a5d6ce0906
adds documentation for the edit command
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
19 | **`-p`** disable file name encryption and decryption |
10a5d6ce0906
adds documentation for the edit command
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
20 | |
10a5d6ce0906
adds documentation for the edit command
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
21 | **`-c`** enable file name and content encryption |
10a5d6ce0906
adds documentation for the edit command
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
22 | |
10a5d6ce0906
adds documentation for the edit command
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
23 | **`-k <key>`** use the specified key for encryption. The key must be configured in |
10a5d6ce0906
adds documentation for the edit command
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
24 | the config.xml file |
10a5d6ce0906
adds documentation for the edit command
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
25 | |
10a5d6ce0906
adds documentation for the edit command
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
26 | **`-V <version>`** downloads a specific version of the resource. Available versions can be listed with the *list-versions* command |
10a5d6ce0906
adds documentation for the edit command
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
27 | |
10a5d6ce0906
adds documentation for the edit command
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
28 |