- Feb
- 240
- 3
One of TCC's very useful features is the ability to press Ctrl-1, Ctrl-2, etc., on the command line, to duplicate arguments from the previous command.
One unexpected problem I've run into, however, is that when a command is executed from the command history, the subsequent command cannot draw upon its arguments with Ctrl-1 etc.
To illustrate, let's say I do the following:
1] I run "cd \windows"
2] I run "cd \temp"
3] Now, I hit the up-arrow twice to get the command "cd \windows" to reappear, and I hit enter
4] Now I type "dir" and hit Ctrl-1
I would expect that this would print "\windows" on the command line, from my previous command in step 3. However, instead, it prints "\temp".
Presumably, this is because the command in step 3 was executed from the command history without any modification. However, I believe that in the overwhelming majority of situations this will not be the desired behavior. When referring to arguments of the previous command, it seems to me that it shouldn't matter whether the previous command was a new command or a repeat of a previous command; either way, the user may well want to do more things with the same arguments.
One unexpected problem I've run into, however, is that when a command is executed from the command history, the subsequent command cannot draw upon its arguments with Ctrl-1 etc.
To illustrate, let's say I do the following:
1] I run "cd \windows"
2] I run "cd \temp"
3] Now, I hit the up-arrow twice to get the command "cd \windows" to reappear, and I hit enter
4] Now I type "dir" and hit Ctrl-1
I would expect that this would print "\windows" on the command line, from my previous command in step 3. However, instead, it prints "\temp".
Presumably, this is because the command in step 3 was executed from the command history without any modification. However, I believe that in the overwhelming majority of situations this will not be the desired behavior. When referring to arguments of the previous command, it seems to me that it shouldn't matter whether the previous command was a new command or a repeat of a previous command; either way, the user may well want to do more things with the same arguments.