summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2017-11-08 10:09:17 +0100
committerGitHub <noreply@github.com>2017-11-08 10:09:17 +0100
commit6392a164f0ab0c2c5deb43d16cf3b5b71155a48c (patch)
treef1135fa1e116df7ae5f1c11c336d89a2579ae452 /src/libstd
parent1db95a2354ecca1c841446dca019c6c26a37bbcf (diff)
parent53de42e3334a004f3ed5bbc33317c871158ca2a4 (diff)
downloadrust-6392a164f0ab0c2c5deb43d16cf3b5b71155a48c.tar.gz
rust-6392a164f0ab0c2c5deb43d16cf3b5b71155a48c.zip
Rollup merge of #45830 - pornel:dosglobs, r=dtolnay
Warn about lack of args glob expansion in Windows shell

Because all shells on Linux/macOS expand globs, and even MinGW on Windows emulates this behavior, it's easy to forget that Windows by itself doesn't support glob expansion. This PR documents this cross-platform difference.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/env.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libstd/env.rs b/src/libstd/env.rs
index f81adad3ebe..457c6e1409d 100644
--- a/src/libstd/env.rs
+++ b/src/libstd/env.rs
@@ -671,6 +671,10 @@ pub struct ArgsOs { inner: sys::args::Args }
 /// set to arbitrary text, and may not even exist. This means this property should
 /// not be relied upon for security purposes.
 ///
+/// On Unix systems shell usually expands unquoted arguments with glob patterns
+/// (such as `*` and `?`). On Windows this is not done, and such arguments are
+/// passed as-is.
+///
 /// # Panics
 ///
 /// The returned iterator will panic during iteration if any argument to the