Closed kristopolous closed 3 weeks ago
This is correct. The right way to fix this is to rearrange how the fundamental parsing works. There may be more aggressive ways to hide the slash but the invocation of say, attach ssh is
$ vastai "attach ssh" "instance-id" "key"
and not
$ vastai "attach" "ssh" "instance-id" "key"
Which would be the actual fix. Forcing "attach ssh" to be equivalent to "attach" "ssh" as in, no escaped space, requires multiple hacks ... it's possible but imho it's not worth it. After type "vastai attach " the parser is looking for options associated with the command "vastai attach" because the space is a field separator that means "next argument" not just an appending of the search token. That is, unless you escape it, like so
$ vastai attach\ ssh
Which is what it's trying to do. The only other fix is to change how argument parsing works between the first and second space delimited word - sometimes, except in the case where it's one word. This is once again, not really worth it.
I'd of course be happy to do it after I exhaust my queue of more relevant tasks unless you think this is a deal-breaker.
This should be completely backwards compatible and gracefully degrade on systems without the pip library installed.