Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

How to? Examples for the new tab completion feature

When I get some free time, I hope to add tab completion for printer names to PrinterStuff. Not sure when I'm going to have that time, though.
 
Here's a not very interesting example. If the command is TYPE, this will only the names of TXT and BTM files.
Load it with "tabcomplete /L typecomplete.btm"
Code:
::TYPECOMPLETE.BTM
if %1 NE TYPE quit 1

unset /q TABCOMPLETIONRESULT

do f in /p dir /ne /b /a:-d %2*.txt;%2*.btm
   iff defined tabcompletionresult then
     set TABCOMPLETIONRESULT=%tabcompletionresult %@quote[%f]
   else
     set TABCOMPLETIONRESULT=%@quote[%f]
   endiff
enddo
quit 0
 
Back
Top