You can encapsulate the full path in quotation marks as follows:
String quoted = "\"" + pathString + "\"";
or when you use bash, avoid spaces:
String escaped = pathString.replace(" ", "\\ ");
Both should work as an argument for your team cd.
source
share