about summary refs log tree commit diff
path: root/library/std/src/sys/windows/args.rs
AgeCommit message (Collapse)AuthorLines
2024-01-11std: begin moving platform support modules into `pal`joboet-379/+0
2023-09-01fix(std): Rename os_str_bytes to encoded_bytesEd Page-2/+2
2023-05-13refactor: Remove redundant, private OsStr::bytesEd Page-2/+4
2023-05-03Use `from_wide_to_user_path` in `read_link`Chris Denton-2/+3
2023-03-21Rollup merge of #96391 - ChrisDenton:command-non-verbatim, r=joshtriplettMatthias Krüger-6/+17
Windows: make `Command` prefer non-verbatim paths When spawning Commands, the path we use can end up being queried using `env::current_exe` (or the equivalent in other languages). Not all applications handle these paths properly therefore we should have a stronger preference for non-verbatim paths when spawning processes.
2023-02-22Quote more batch file argumentsChris Denton-1/+10
Make sure to quote batch file arguments that contain command prompt special characters. Additionally add `/d` command line parameter to disable any commands that may change the way variable expansion works.
2022-12-02Windows: make Command prefer non-verbatim pathsChris Denton-6/+17
When spawning Commands, the path we use can end up being queried using `env::current_exe` (or the equivalent in other languages). Not all applications handle these paths properly therefore we should have a stronger preference for non-verbatim paths when spawning processes.
2022-11-28Extract WStrUnits to sys_common::wstrAyush Singh-52/+2
This commit extracts WStrUnits from sys::windows::args to sys_common::wstr. This allows using the same structure for other targets which use wtf8 (example UEFI). This was originally a part of https://github.com/rust-lang/rust/pull/100316 Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2022-06-28Add a fixme commentChris Denton-0/+3
2022-06-28Remove feature `const_option` from stdChris Denton-4/+12
2022-03-25Check for `"` and `\` in a filenameChris Denton-1/+9
And also fix typo.
2022-03-23Command: handle exe and batch files separatelyChris Denton-0/+86
2022-03-23Refactor: Move argument building into argsChris Denton-0/+65
2021-08-08Implement modern Windows arg parsingChris Denton-105/+152
As derived from extensive testing of `argv` in a C/C++ application. Co-Authored-By: Jane Lusby <jlusby42@gmail.com>
2021-04-25Auto merge of #84115 - CDirkx:rt, r=m-ou-sebors-4/+0
Rework `init` and `cleanup` This PR reworks the code in `std` that runs before and after `main` and centralizes this code respectively in the functions `init` and `cleanup` in both `sys_common` and `sys`. This makes is easy to see what code is executed during initialization and cleanup on each platform just by looking at e.g. `sys::windows::init`. Full list of changes: - new module `rt` in `sys_common` to contain `init` and `cleanup` and the runtime macros. - `at_exit` and the mechanism to register exit handlers has been completely removed. In practice this was only used for closing sockets on windows and flushing stdout, which have been moved to `cleanup`. - <s>On windows `alloc` and `net` initialization is now done in `init`, this saves a runtime check in every allocation and network use.</s>
2021-04-22Move most init to `sys::init`Christiaan Dirkx-2/+0
2021-04-22Remove `sys::args::Args::inner_debug` and use `Debug` insteadChristiaan Dirkx-12/+2
2021-04-22Move all cleanup to `sys::cleanup`Christiaan Dirkx-2/+0
2020-08-31std: move "mod tests/benches" to separate filesLzu Tao-66/+3
Also doing fmt inplace as requested.
2020-07-27mv std libs to library/mark-0/+266