joeware - never stop exploring... :)

Information about joeware mixed with wild and crazy opinions...

Annoying annoying annoying annoying…

by @ 1:13 am on 4/8/2009. Filed under tech

PS C:\Documents and Settings\$joe.TEST> cd\
The term ‘cd\’ is not recognized as a cmdlet, function, operable program, or script file. Verify the term and try again
.
At line:1 char:3
+ cd\ <<<<

Rating 3.00 out of 5

11 Responses to “Annoying annoying annoying annoying…”

  1. Martin Zugec says:

    function cd\ {Set-Location \}

    But I understand, had same problem to get used to it 😉

  2. +1 – That “feature” annoys the crap out of me.

  3. Glenn says:

    Hi,

    I think you need to do it like this:

    PS C:\Documents and Settings\$joe.TEST>cd \

  4. agreed, it is fixed in v2

  5. Deano says:

    Seems to work for me just fine. Must be that “legacy” software you insist on using :0)

  6. joe says:

    Deano: Shush, what are you running on now? Like Windows 9 or something?

    Glenn: Yep knew about the cd[space]\. cd\ and cd.. are burned into my finger’s DNA at this point as it has been consistent in the shells I work on going back over 20 years.

    Additionally I hate that there is perceptable delay to come back with that error message… Open a command prompt and type cd<> or something else nonsensical and watch how fast that comes back, your finger hasn’t even left the ENTER key yet and it is telling you you dorked it up…

  7. Andrew from Vancouver says:

    My pet peeve:

    Windows PowerShell
    Copyright (C) 2006 Microsoft Corporation. All rights reserved.

    PS H:\> cd /d c:\temp
    Set-Location : A parameter cannot be found that matches parameter name ‘c:\temp’.
    At line:1 char:3
    + cd <<<

    I’ve long gotten used to changing the drive letter and the directory with a single CD command.

  8. Scotte says:

    There is some precedent for this. In cmd.exe, tab completion doesn’t work with cd\ either.

  9. joe says:

    Hmm I have to disagree with you Scott, I would argue tab completely is working perfectly in that situation. Tab completion is parameter driven and parameters to cmd are separate tokens separated by space (as adjusted by quotes). So when the tab completion logic kicks in when you have cd\ there should it think to expand from the \ or should it take cd\ as the token to try and expand? Create a folder called CD and a subfolder under it called something like hello and then from the folder that has the cd folder you created type cd\[TAB]

    cd\ and cd.. when used by themselves are specially handled by cmd.

    Granted they could put special handling into tab completion and say, well if this is the first param and a \ is present, expand but I think I prefer how it was done.

  10. Bwandon says:

    cd /d c:\temp
    is easier
    cd c:\temp

  11. Bwandon says:

    @joe
    “d[space]\. cd\ and cd..”
    all work in v2

[joeware – never stop exploring… :) is proudly powered by WordPress.]