WAD DO /S ... all dirs wind up in the history!

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
#1
When I do this:
Code:
do f in /s * ( echos x )
every folder entered by DO winds up in the dirhistory list. I do have "Save directory on entry" checked but I wouldn't expect it to behave like that. "FOR /R" doesn't do that.
 
#2
I raised the same issue relative to COPY /S in the past and was informed WAD. I would like the directory history to include only those directories that have been entered explicitly, via CD/CDD/PUSHD or via the "implied directory change" available at the command prompt. The issue for me is that I often do "copy /s /uf" from a directory which has hundreds of subdirectories, and they all end up in dirhist... making previously entered directories virtually invisible.
--
Steve
 

rconn

Administrator
Staff member
May 14, 2008
10,101
85
#4
When I do this:
Code:
do f in /s * ( echos x )
every folder entered by DO winds up in the dirhistory list. I do have "Save directory on entry" checked but I wouldn't expect it to behave like that. "FOR /R" doesn't do that.
WAD (and unavoidable) when "Save directory on entry" is set. (One of the reasons I really didn't want to offer that option.)

The only way around it is a substantial parser rewrite; IMO it isn't worth the considerable effort and risk involved.
 
#5
WAD (and unavoidable) when "Save directory on entry" is set. (One of the reasons I really didn't want to offer that option.)

The only way around it is a substantial parser rewrite; IMO it isn't worth the considerable effort and risk involved.
Really too bad. If it's not a bug, it's poor design. I've suggested it be changed in a future version. I am stuck with a hard-to-use dirhistory list (corrupted, IMHO) until I manually clean it out.
 

samintz

Scott Mintz
May 20, 2008
1,204
11
Solon, OH, USA
#6
Vince,
If you are executing that DO command from the command line, there aren't many workarounds. But if you are doing it from within a batch script, you can save your dirhistory to a file prior to executing the command and then restore it afterwards.

Of course, you could do that from the command line too. It's just more of a PITA.
 

samintz

Scott Mintz
May 20, 2008
1,204
11
Solon, OH, USA
#7
Rex,

WAD (and unavoidable) when "Save directory on entry" is set. (One of the reasons I really didn't want to offer that option.)

The only way around it is a substantial parser rewrite; IMO it isn't worth the considerable effort and risk involved.
Does this issue only happen when "Save directory on entry" is set? If so, can't you temporarily just turn that option off?
 

rconn

Administrator
Staff member
May 14, 2008
10,101
85
#8
Really too bad. If it's not a bug, it's poor design. I've suggested it be changed in a future version. I am stuck with a hard-to-use dirhistory list (corrupted, IMHO) until I manually clean it out.
IMO it's not a poor design; it's a poor decision by a few users to demand that feature (and all its myriad associated problems) be added to an existing long-standing design that has no provision for it.

(You can bolt your lawnmower to your car, but it's probably not fair to then complain that your car does a lousy job mowing the lawn ...)
 
#9
IMO it's not a poor design; it's a poor decision by a few users to demand that feature (and all its myriad associated problems) be added to an existing long-standing design that has no provision for it.

(You can bolt your lawnmower to your car, but it's probably not fair to then complain that your car does a lousy job mowing the lawn ...)
We users are not familiar with the limitations imposed by the long-standing design. From our point of view (I hope I speak for others) the request seems quite reasonable.
 

rconn

Administrator
Staff member
May 14, 2008
10,101
85
#10
We users are not familiar with the limitations imposed by the long-standing design. From our point of view (I hope I speak for others) the request seems quite reasonable.
You *should* be, given that it was discussed for many months before I was forced to implement it (and I had warned of the problems that would ensue)! :eek: