add docs for quote_dropped_files

Signed-off-by: Ye Sijun <junnplus@gmail.com>
This commit is contained in:
Ye Sijun authored and Wez Furlong committed 2022-04-25 09:49:32 -07:00
1 parent 27d36250a9
commit ccd3403bad
3 files changed
+30 -3

No files matched your search

+1 -1
View File
@@ -1470,7 +1470,7 @@ impl Default for ExitBehavior {
#[derive(Debug, Deserialize, Serialize, Clone, Copy, PartialEq, Eq)]
pub enum DroppedFileQuoting {
/// Do no quoting at all, just pass through the name as-is
/// No quoting is performed, the file name is passed through as-is
None,
/// Backslash escape only spaces, leaving all other characters as-is
SpacesOnly,
@@ -0,0 +1,27 @@
## quote_dropped_files = "SpacesOnly"
*Since: nightly builds only*
Controls how file names are quoted (or not) when dragging and dropping.
There are three possible values:
* `"None"` - no quoting is performed, the file name is passed through as-is.
* `"SpacesOnly"` - backslash-escape only spaces, leaving all other characters as-is. This is the default.
* `"Posix"` - use POSIX style shell word escaping.
For example:
|`quote_dropped_files` |file name |quoted result |
|----------------------|-------------|---------------|
|`"None"` |`hello world`|`hello world` |
|`"SpacesOnly"` |`hello world`|`hello\ world` |
|`"Posix"` |`hello world`|`"hello world"`|
Files drag and drop support is a platform dependent feature
|Platform |Supported since |
|----------|-------------------|
|macOS |nightly builds only|
|Windows |Not yet |
|X11 |Not yet |
|Wayland |Not yet |
+2 -2
View File
@@ -177,10 +177,10 @@ pub enum WindowEvent {
Notification(Box<dyn Any + Send + Sync>),
// Called when the files is being dragged into the window
// Called when the files are being dragged into the window
DraggedFile(Vec<PathBuf>),
// Called when the files is been dropped into the window
// Called when the files are dropped into the window
DroppedFile(Vec<PathBuf>),
}