The 4DOS command processor for MS-DOS

4dos, batch commands, grub 4 dos, dos 4, ms dos 4

Suggestion for "cdd" command

In a (near) future release of 4DOS, how about changing the behavior of
the "cdd" command when no parameter is given.  Currently it just prints a
usage message.  It’d be much more useful if it emulated the behavior of
"cd" and printed the current drive and directory.

I ask for this because I have "cdd" aliased to "cd".  Many third-party
batch files seem to rely on "cd" returning the current directory, and
this breaks them.

[Posted to comp.os.msdos.4dos and CC'd to <supp...@jpsoft.com>.]


——————————< Steve King, stea…@pshrink.chi.il.us >–
"You get all the /sturm und drang/ novice beer drinkers would sprain
a taste bud on."  (found on a six-pack of Bell’s Pale Ale)

.
posted by admin in Uncategorized and have Comment (1)

One Response to “Suggestion for "cdd" command”

  1. admin says:

    PLEASE avoid posting duplicates.  See the response I already posted as a
    reply to the identical message you sent me via email.  The short answer
    is that CDD is fine, but that you apparently failed to allow your alias
    to return the CWD when invoked without arguments.  One approach would
    be:

      CDD=%@if[%# eq 0,*CD,*cdd]

    Of course, the current working directory is best returned by _CWD and
    related internal variables.

    One advantage of aliases is that they can be used to make any command do
    most anything _YOU_ want… :-)

    Steve King wrote:

    > In a (near) future release of 4DOS, how about changing the behavior of
    > the "cdd" command when no parameter is given.  Currently it just prints a
    > usage message.  It’d be much more useful if it emulated the behavior of
    > "cd" and printed the current drive and directory.

    > I ask for this because I have "cdd" aliased to "cd".  Many third-party
    > batch files seem to rely on "cd" returning the current directory, and
    > this breaks them.

    > [Posted to comp.os.msdos.4dos and CC'd to <supp...@jpsoft.com>.]

     _____________________________________________________________
     Mike Bessy                    JP Software, Inc.
     supp…@jpsoft.com            http://www.jpsoft.com/
     CompuServe 75300,1215         "GO JPSOFT"
     _____________________________________________________________