- Jun
- 733
- 16
It would be helpful if the aliases CD_LEAVE and CD_ENTER would be executed only when there is an actual directory change. Right now, I'm getting things like this (with my debugging output):
Alias CD_LEAVE
%1=C:\Users\Jay\Dropbox
%2=C:\Users\Jay\Dropbox
Alias CD_ENTER
oldcwd=C:\Users\Jay\Dropbox
newcwd=C:\Users\Jay\Dropbox
As you can see, the directory was not actually changing.
I also just observed that performing "bat:vedit.btm" to launch my text editor via a script causes an invocation of the two aliases without any change of directory.
TCC(27.01.23): C:\tcmd\ver27>bat:vedit
Alias CD_LEAVE
%1=C:\tcmd\ver27
%2=C:\tcmd\ver27
Alias CD_ENTER
oldcwd=C:\tcmd\ver27
newcwd=C:\tcmd\ver27
TCC(27.01.23): C:\tcmd\ver27>
I want to use these aliases to run a batch file (autoex.btm, if present) when I first change to a new directory. It typically displays a file listing or some other information of use to a project that would be carried out in that directory (e.g., defining some special aliases or launching a program). So I really don't want those aliases running all the time when no change is actually taking place. They should run only when the CD or CDD command is run (or the automatic equivalents, e.g., the command c:\temp\).
In the past, I have done this with a very complex prompt variable that includes a lot of %@exec[] calls. That all worked fine in version 25. The new aliases could make things much easier if they worked better.
In addition, there is something about that complex prompt defintion that causes version 27 to crash very frequently. I very quickly had to stop using it and went back to version 25. It appears from my testing today that the problem arises from that prompt code.
Alias CD_LEAVE
%1=C:\Users\Jay\Dropbox
%2=C:\Users\Jay\Dropbox
Alias CD_ENTER
oldcwd=C:\Users\Jay\Dropbox
newcwd=C:\Users\Jay\Dropbox
As you can see, the directory was not actually changing.
I also just observed that performing "bat:vedit.btm" to launch my text editor via a script causes an invocation of the two aliases without any change of directory.
TCC(27.01.23): C:\tcmd\ver27>bat:vedit
Alias CD_LEAVE
%1=C:\tcmd\ver27
%2=C:\tcmd\ver27
Alias CD_ENTER
oldcwd=C:\tcmd\ver27
newcwd=C:\tcmd\ver27
TCC(27.01.23): C:\tcmd\ver27>
I want to use these aliases to run a batch file (autoex.btm, if present) when I first change to a new directory. It typically displays a file listing or some other information of use to a project that would be carried out in that directory (e.g., defining some special aliases or launching a program). So I really don't want those aliases running all the time when no change is actually taking place. They should run only when the CD or CDD command is run (or the automatic equivalents, e.g., the command c:\temp\).
In the past, I have done this with a very complex prompt variable that includes a lot of %@exec[] calls. That all worked fine in version 25. The new aliases could make things much easier if they worked better.
In addition, there is something about that complex prompt defintion that causes version 27 to crash very frequently. I very quickly had to stop using it and went back to version 25. It appears from my testing today that the problem arises from that prompt code.