AuroraRuntime/Include/Aurora/CmdLine
2024-09-27 22:46:50 +01:00
..
CmdLine.hpp [*] AuCmdLine::GetValue(...) (both variants) refactored to use views to help with future stability issues around AuStrings (and their allocator?) 2024-09-27 22:46:50 +01:00
README.md [+] NS readmes 2022-06-12 18:28:51 +01:00

AuCmdLine

Example Usage:
File: HelloAurora/master/Tests/Public/3. Hello Command Line/Main.cpp
Example: https://cyberia.tokyo/notice/AHx8CkwoqqW26byDJ2

Platform normalization

Different shells will parse execv or generate the process command line string differently
For instance, to take the flag 'Hello World' and pass it to a program without additional CLI parsing, you would need to write:

Powershell: & '.\3. Hello Command Line.Stage.Win32.x86_64.exe' Hello` World
CMD : "3. Hello Command Line.Stage.Win32.x86_64.exe" "Hello World"
Linux : ./3.\ Hello\ Command\ Line.Stage.Linux.x86_64 Hello\ World

Despite this, GetFlags and GetValues will unescape \ on NT platforms.

EG:
"3. Hello Command Line.Stage.Win32.x86_64.exe" --test=Hello\ World
"3. Hello Command Line.Stage.Win32.x86_64.exe" --test="Hello World"
"3. Hello Command Line.Stage.Win32.x86_64.exe" --test "Hello World"
"3. Hello Command Line.Stage.Win32.x86_64.exe" /test="Hello World"
"3. Hello Command Line.Stage.Win32.x86_64.exe" /test "Hello World"
"3. Hello Command Line.Stage.Win32.x86_64.exe" test="Hello World"
"3. Hello Command Line.Stage.Win32.x86_64.exe" test=Hello\ World
[2022-02-20 18:25:48][Info] | Flags: 0
[2022-02-20 18:25:48][Info] | Values: 1
[2022-02-20 18:25:48][Info] | test=Hello World \