tab completion with directory commands

Nov 19, 2014
9
0
When I type CD <tab>
I get filenames as well as directories. Is there any way to limit TCC to be smart about tab completion in this case?
 
May 26, 2008
537
4
At the TCC prompt, type OPTIONS to bring up the options dialog.

Go to the Command Line tab and look in the Filename Completion frame.

In the Options text box, enter something like this:

Code:
cd md rd:DIRS;

This will cause the cd, md, and rd commands to only complete directories.
 
Jun 3, 2008
130
3
Temecula, CA
I read the topic above, and my problem is that no matter what I do, I can't get my folders to appear in the unsorted order I want. I am looking at a network share to which I have mapped a drive, u:. When I enter dir u: /o:u, it always ends up with "VESTA Map" before VESTA. (I want VESTA completed first.) I've tried creating a new folder that lists after VESTA and then moving all of the contents of "VESTA Map" into that new folder, then deleting "VESTA Map" and finally renaming the new folder to "VESTA Map", and all of a sudden, dir u: /o:u lists "VESTA Map" first again.

Am I doing something wrong? Or is there some way to force its completion to go in alphabetical order (since a regular dir lists VESTA first)?
 
May 26, 2008
537
4
Filename completion options being discussed in this thread have nothing to do with DIR sort order.

That being said, I too notice that *dir /o:u still seems to sort everything alphabetically on my system. Not sure if that's a functional change in the operating system APIs (I'm running on Windows 7) or what.
 

rconn

Administrator
Staff member
May 14, 2008
12,356
150
Filename completion options being discussed in this thread have nothing to do with DIR sort order.

That being said, I too notice that *dir /o:u still seems to sort everything alphabetically on my system. Not sure if that's a functional change in the operating system APIs (I'm running on Windows 7) or what.

NTFS always keeps files in alphabetical order.
 

rconn

Administrator
Staff member
May 14, 2008
12,356
150
I read the topic above, and my problem is that no matter what I do, I can't get my folders to appear in the unsorted order I want. I am looking at a network share to which I have mapped a drive, u:. When I enter dir u: /o:u, it always ends up with "VESTA Map" before VESTA. (I want VESTA completed first.) I've tried creating a new folder that lists after VESTA and then moving all of the contents of "VESTA Map" into that new folder, then deleting "VESTA Map" and finally renaming the new folder to "VESTA Map", and all of a sudden, dir u: /o:u lists "VESTA Map" first again.

Am I doing something wrong? Or is there some way to force its completion to go in alphabetical order (since a regular dir lists VESTA first)?

Filename / directory completion is always in the order the file system returns them (alphabetic on an NTFS drives; other file systems will vary). There is no sorting option.
 
May 26, 2008
537
4
NTFS always keeps files in alphabetical order.
Ah. Personally I'm glad for this, and it probably means I no longer have to put DIRCMD=/O to get default sorting in cmd.exe any more! I had been doing that since MS-DOS 6...thru Windows 9x..etc.

Personally I don't understand why someone would want it unsorted.

Regarding Mickey's problem, I created a "VESTA" and "VESTA Map" folder and DIR showed them in the order I would expect: VESTA first.
 
Similar threads
Thread starter Title Forum Replies Date
P How to enable \ with tab completion Support 4
D Tab completion differences with cmd.exe Support 3
vefatica Tab completion? Support 4
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 2
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