Tab completion differences with cmd.exe

Aug 21, 2014
18
1
I noticed two differences with the way TCC handles tab completion versus cmd.exe.

(1) "Backspace" works differently. Imagine you are completing a filename, you type:
C:\>C:\Progra<tab>​
The directory would be complete:
C:\>"C:\Program Files"​

You then start tabbing through the program files list, only to realize that you actually wanted "C:\Program Files (x86)".

Under cmd.exe, I can simply backspace to the end of the "Program Files" and press <tab> to complete the next entry ("Program Files (x86)"). Under TCC, I would have to remove the entire "Program Files" before it will let me complete again. If I simply go back to "Program Files" and press <tab>, it beeps.

The cmd.exe behavior is much easier to use since it's easier to make corrections.

(2) Shift+Tab/Tab are circular in cmd.exe.

Let's say I have three directories:
C:\Program Files
C:\Program Files (x86)
C:\Python​

I type "C:\P<shift+tab>"

Under cmd.exe, it would auto-complete to C:\Python. Pressing shift+tab again would complete to "Program Files (x86)"

Under tcc.exe, it would auto-complete to C:\Program Files and pressing shift+tab again does not work.

In addition, under cmd.exe, I can press tab to cycle through the list (so pressing <Tab> after C:\Python would autocomplete to "C:\Program Files".

This is useful when I have a series of similarly named files and I want to complete to the last (or second to last one).

This TCC behavior is as of TCC 18.00.31.

Is there any way of making TCC use the cmd.exe behavior? Or is this something that could be added in a future version?
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,460
88
Albuquerque, NM
prospero.unm.edu
I noticed two differences with the way TCC handles tab completion versus cmd.exe.

(1) "Backspace" works differently. Imagine you are completing a filename, you type:
C:\>C:\Progra<tab>​
The directory would be complete:
C:\>"C:\Program Files"​

You then start tabbing through the program files list, only to realize that you actually wanted "C:\Program Files (x86)".

Under cmd.exe, I can simply backspace to the end of the "Program Files" and press <tab> to complete the next entry ("Program Files (x86)"). Under TCC, I would have to remove the entire "Program Files" before it will let me complete again. If I simply go back to "Program Files" and press <tab>, it beeps.

That works fine for me, provided I do have "Program Files" with the closing quote. Filename completion doesn't like unbalanced quotes. If you remove the close quote and Tab doesn't work, e.g. "Progra ... then just add a quote to make it "Progra", and Tab will be happy again.

(No, I'm not aware of any directive to make the file-completion buffer act circular.)
 

rconn

Administrator
Staff member
May 14, 2008
12,344
149
(2) Shift+Tab/Tab are circular in cmd.exe.

Let's say I have three directories:
C:\Program Files
C:\Program Files (x86)
C:\Python​

I type "C:\P<shift+tab>"

Under cmd.exe, it would auto-complete to C:\Python. Pressing shift+tab again would complete to "Program Files (x86)"

Under tcc.exe, it would auto-complete to C:\Program Files and pressing shift+tab again does not work.

In addition, under cmd.exe, I can press tab to cycle through the list (so pressing <Tab> after C:\Python would autocomplete to "C:\Program Files".

This is useful when I have a series of similarly named files and I want to complete to the last (or second to last one).

This TCC behavior is as of TCC 18.00.31.

Is there any way of making TCC use the cmd.exe behavior? Or is this something that could be added in a future version?

The shift+tab key in TCC (the same as pressing F8) recalls the previous match. Tab matches forward, shift-tab / F8 returns the previous match.

But if that's what you want to do, you're doing it the hard way. Try "C:\P<F7>" instead.
 
Aug 21, 2014
18
1
I have verified that the unbalanced quotes were causing the problem. If I add the missing quote in, the tab completion works as expected.

I just tried the F7 mode and it does make it easier, although in some cases, a circular completion would come in handy ;)
 
Similar threads
Thread starter Title Forum Replies Date
P How to enable \ with tab completion Support 4
vefatica Tab completion? Support 4
I tab completion with directory commands Support 7
rps Command Input Window tab completion broken Support 7
T Tab completion annoyances Support 37
S Weird tab completion in command line Support 2
nickles Tab completion Support 9
S TCC 9.02 vs 4NT 8.02 TAB completion on FTP Support 7
vefatica Tab (^t) in @FILEWRITE's text Support 0
D TCC tab detaching & restarting Support 3
Joe Caverly Changing the TAB key Support 10
fpefpe bash.exe as a tab Support 0
C How to? Mouse support in WSL when in Take Command Tab Support 2
Joe Caverly DrawVLine results different in TCMD tab and detached TCC Support 11
Joe Caverly Tab from clipboard Support 6
Joe Caverly Clone a TCC Tab Support 9
R New Cloud Storage Tab in TCC options causing problems Support 0
CWBillow PowerShell tab as Admin Support 2
vefatica TYPE resets console tab settings Support 14
CWBillow TCMD PowerShell Tab elevated Support 6
CWBillow Take Command tab as PowerShell Support 3
Fross Tab Question Support 6
CWBillow TCMD Tab Defs Support 4
L WAD In console, tabs are rendered with non-uniform tab-stop spacing Support 16
Emilio III TCMD Tab titles on Insider Windows Support 2
P Run as Admin tab in non-elevated Take Command session? Support 9
CWBillow Powershell tab in TCMD? Support 2
Phileosophos Startup tab layout Support 2
M How to? How to set a default TITLE for newly opened tab? Support 2
R How to? Change TCMD tab font size in window menu Support 3
D Get tab position and size Support 6
C Running PowerShell_ISE in a Tab Support 7
D How cut in TCC tab window Support 5
C How to? run a BTM in elevated, inv tcc tab window Support 9
D Take Command tab only uses half of window Support 1
rps Tab clone problem Support 2
C MONITOR commands alter tab title when triggered Support 0
H lua Causes Take Command Tab to Exit Support 5
D How to? How to show variables expanded in the log tab Support 3
R Fixed v17.0.54 Tab->COMSPEC Dialog Box Issue Support 2
vefatica Fixed Crash removing toolbar tab Support 1
I v16 Spawning a PowerShell tab Support 3
Jay Sage Getting Quote Characters into a Toolbar Tab Support 12
Jay Sage "New Tab" Strangeness Support 2
David Wilbanks How to make new tab open in same directory as previous tab? Support 4
tmaynard How to? Any way to run a command in a new tab at startup? Support 18
A How to? Frozen session tab with "ERROR: The file is either empty or does not contain the valid choices." Support 19
W Opening a new tab takes forever to get the command prompt Support 5
Joe Caverly VIEW window in a TCC tab window problems Support 5
B WAD tab navigation broken Support 3

Similar threads