- Jun
- 762
- 16
Now I've encountered a problem with the CD_ENTER alias. The help file says:
CD_Enter - TCC will execute this alias immediately after changing the current directory.
Note that it says that the alias will be executed AFTER the directory change has been made. However, look at this.
TCC(27.01.23): C:\>alias cd_enter
set newcwd=%1 & echo `%1=`%1 & echo oldcwd=%oldcwd & echo newcwd=%newcwd & dir a*
TCC(27.01.23): C:\>cd temp
%1=C:\temp
oldcwd=C:\
newcwd=C:\temp
Volume in drive C is Windows Serial number is a879:820d
TCC: (Sys) The system cannot find the file specified.
"C:\a*"
0 bytes in 0 files and 0 dirs
734,644,273,152 bytes free
TCC(27.01.23): C:\temp>
The alias displays some debugging information and then runs the command "dir a*" to generate a short (or empty) display with a header to show which directory is being examined. Note that the command was run not in the new directory "c:\temp" but in the old directory "c\". It seems to have run before the directory change had been completed.
CD_Enter - TCC will execute this alias immediately after changing the current directory.
Note that it says that the alias will be executed AFTER the directory change has been made. However, look at this.
TCC(27.01.23): C:\>alias cd_enter
set newcwd=%1 & echo `%1=`%1 & echo oldcwd=%oldcwd & echo newcwd=%newcwd & dir a*
TCC(27.01.23): C:\>cd temp
%1=C:\temp
oldcwd=C:\
newcwd=C:\temp
Volume in drive C is Windows Serial number is a879:820d
TCC: (Sys) The system cannot find the file specified.
"C:\a*"
0 bytes in 0 files and 0 dirs
734,644,273,152 bytes free
TCC(27.01.23): C:\temp>
The alias displays some debugging information and then runs the command "dir a*" to generate a short (or empty) display with a header to show which directory is being examined. Note that the command was run not in the new directory "c:\temp" but in the old directory "c\". It seems to have run before the directory change had been completed.