mirror of
				https://github.com/nsnail/spectre.console.git
				synced 2025-10-31 09:09:25 +08:00 
			
		
		
		
	Command line argument parsing improvements (#1048)
* Support negative numbers as command option values * Support command line options before arguments * POSIX-compliant handling of quotes (double and single, terminated and unterminated), whitespace, hyphens, and special characters (e.g. emojis)
This commit is contained in:
		| @@ -1,4 +1,4 @@ | ||||
| Error: Flags cannot be assigned a value. | ||||
|  | ||||
|        dog --alive foo | ||||
|        dog --alive=indeterminate foo | ||||
|            ^^^^^^^ Can't assign value | ||||
| @@ -1,4 +1,4 @@ | ||||
| Error: Flags cannot be assigned a value. | ||||
|  | ||||
|        dog -a foo | ||||
|        dog -a=indeterminate foo | ||||
|            ^^ Can't assign value | ||||
| @@ -1,3 +0,0 @@ | ||||
| # Raw | ||||
| /c | ||||
| set && pause | ||||
| @@ -1,4 +0,0 @@ | ||||
| Error: Encountered unterminated quoted string 'Rufus'. | ||||
|  | ||||
|        --name "Rufus | ||||
|               ^^^^^^ Did you forget the closing quotation mark? | ||||
		Reference in New Issue
	
	Block a user
	 Frank Ray
					Frank Ray