- Feb
- 240
- 3
The documentation for CD notes:
"TCC recognizes a single hyphen on the command line as an internal alias for CD -"
However, when trying this out, I was (very pleasantly) surprised to find that although "CD -" cannot switch the active directory between two alternating directories on two different drives (that is, it switches the active directory for the given drive but does change the active drive), using a single hyphen does indeed allow for this.
So, it seems to me, it's not quite accurate to say that a single hyphen is an alias for "cd -". Rather it seems to be more like an alias for "cdd -" or for "cd /d -".
"TCC recognizes a single hyphen on the command line as an internal alias for CD -"
However, when trying this out, I was (very pleasantly) surprised to find that although "CD -" cannot switch the active directory between two alternating directories on two different drives (that is, it switches the active directory for the given drive but does change the active drive), using a single hyphen does indeed allow for this.
So, it seems to me, it's not quite accurate to say that a single hyphen is an alias for "cd -". Rather it seems to be more like an alias for "cdd -" or for "cd /d -".