Hi,

I was thinking of making this post a reply to Dave Benham's post "Improved portableshell.bat for Strawberry Perl". However, I'm not at all sure that the issue I've been facing is related to the issues Dave has raised.

I have 8 separate installations of Strawberry Perl, each with their own portableshell.bat.

A month or two back I discovered that the "up" and "down" arrow (history) keys were no longer working on these "portableshell.bat" shells. That is, I could no longer use those keys to go back and forth through the previous commands that I had run - pressing those keys did absolutely nothing. This affected only the "portableshell.bat" shells - and it affected all 8 of them. The history keys were still working fine with shells opened up by clicking on "cmd.exe".

I'm quite sure that the history keys originally worked fine in the "portableshell.bat" shells, and that they became non-functioning no more than 3 months ago.

Today, I opened up one of the "portableshell.bat" shells, and noticed that the following environment variables were set for portableshell, but unset for cmd:

drive=C:\_32\strawberry5.22.0\
drivep=C:\_32\strawberry5.22.0

So, in the open "portableshell.bat" shell, I cleared both of those environment variables (but only for the open shell) - and the history keys immediately started working fine again. I then reset those 2 environment variables to their original values - and the history keys continued to work. I then opened each of the other 7 "portableshell.bat" shells - and the history keys immediately worked correctly for them, too.

It's as though the momentary clearing of those environment variables toggled something on this (Windows 7) machine that switched the history keys back on for the Strawberry Perl shells.

So, the problem has been fixed but I still don't understand it at all - nor do I know how to re-create it.

Any explanations ?

Oddly, the usages of '#' (discussed at http://stackoverflow.com/questions/35867036/usage-of-pound-sign-in-batch-files) that ultimately led to Dave's post to this list also involve references to "drive" and "drivep".

Cheers,
Rob

Reply via email to