Tab completion

Jun 24, 2008
223
0
Siegen, Germany
Hello Vince,

when - in the help (What's new) - you write "Tab completion now supports internal variables", what exactly do you mean?

The following - still - doesn't work:

vi %TC%\tcs<tab>

I still have to press <ctrl>x first (which is really annoying).

Btw. most (nearly all) tcmd.ini options governing the control of command line completion are missing from the help (e.g. CompleteHidden, CompletePaths, ServerCompletion - using the CHM's search option).

nickles
 
May 20, 2008
3,515
4
Elkridge, MD, USA
nickles wrote:
| Hello Vince,

I think you meant Rex!

| when - in the help (What's new) - you write "Tab completion now
| supports internal variables", what exactly do you mean?
|
| The following - still - doesn't work:
|
| vi %TC%\tcs<tab>
|
| I still have to press <ctrl>x first (which is really annoying).

TC is an environment variable. The first character of the name of an
internal variable is always _ (underscore). Try to expand %_cmd using the
TAB key multiple times, it will propose %_cmdline, %_cmdproc and %_cmdspec.

| Btw. most (nearly all) tcmd.ini options governing the control of
| command line completion are missing from the help (e.g.
| CompleteHidden, CompletePaths, ServerCompletion - using the CHM's
| search option).

Rex wants us to use the OPTION dialog to set these. BTW, there is now a
separate OPTION dialog switch to complete hidden files and hidden
directories.
--
HTH, Steve
 

rconn

Administrator
Staff member
May 14, 2008
12,345
150
> when - in the help (What's new) - you write "Tab completion now
> supports internal variables", what exactly do you mean?
>
> The following - still - doesn't work:
>
> vi %TC%\tcs<tab>
>
> I still have to press <ctrl>x first (which is really annoying).

That's variable expansion, not tab completion. (It's also not an internal
variable.)

V11 supports completing a variable name; i.e., something like "%_bat<tab>"
will expand to the internal variables beginning with "bat".


> Btw. most (nearly all) tcmd.ini options governing the control of
> command line completion are missing from the help (e.g. CompleteHidden,
> CompletePaths, ServerCompletion - using the CHM's search option).

All TCMD.INI options are missing from the help, with the exception of key
mapping or advanced directives.

All others are in the OPTION dialogs, which is the only way we support their
use.

Rex Conn
JP Software
 
Jun 24, 2008
223
0
Siegen, Germany
@Vince

Sorry for addressing you (I think I got used to communicating with you over the last few days ;-).

Of course I meant to address JPSoft (Rex).

@Steve

Thanks for the answers despite of not having been addressed!

@Rex

1) I obviously got the terms wrong (tab completion <=> variable expansion); sorry for that.
However, the problem I describe already appeared in the suggestions for a new version (i.e. 11) some time ago. Do you see a chance to implement such a behavior? It would *really* be appreciated (and come pretty handy).

2) Sorry to hear that. I use a structured tcmd.ini file which is completely "devastated" after using OPTION.

Thanks to all

nickles
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,461
88
Albuquerque, NM
prospero.unm.edu
1) I obviously got the terms wrong (tab completion <=> variable expansion); sorry for that.
However, the problem I describe already appeared in the suggestions for a new version (i.e. 11) some time ago. Do you see a chance to implement such a behavior? It would *really* be appreciated (and come pretty handy).

You can expand variables on the command line with Control-X. (You can assign a different key with the VariableExpand .INI directive, if you like.)
 
Jun 24, 2008
223
0
Siegen, Germany
@Charles

I'm aware of that. However it would be nice to have the following working w/o having to press <ctrl>x first:

%systemroot%\win<tab>[TAB]

instead of

%systemroot%\win<ctrl>[CTRL-x<tab>][TAB]

nickles
</tab></ctrl></tab></ctrl>
 
May 20, 2008
3,515
4
Elkridge, MD, USA
nickles wrote:
| @Charles
|
| I'm aware of that. However it would be nice to have the following
| working w/o having to press <ctrl>x first:
|
| %systemroot%\win<tab>
|
| instead of
|
| %systemroot%\win<ctrl>x<tab>

That would be esp. useful when it is part of a FOR command, because using
the "VariableExpand" key also "expands" ALL variables in the command line.

V12 suggestion: let the VariableExpand key operate ONLY on the variable
whose name is "under" the cursor, instead of all variables in the whole
command line.
--
Steve
 
May 29, 2008
571
4
Groton, CT
<ctrl><tab><ctrl><tab>
V12 suggestion: let the VariableExpand key operate ONLY on the variable
whose name is "under" the cursor, instead of all variables in the whole
command line.

I disagree with that. I find it very useful to expand all the variables at once.
Rex, if you're thinking about changing this, please consider a configurable ini-option like "Ctrl/X expands all variables or just one" [all|ONE].


</tab></ctrl></tab></ctrl>
 
May 20, 2008
3,515
4
Elkridge, MD, USA
dcantor wrote:
| ---Quote (Originally by Steve Fbin)---
| <ctrl><tab><ctrl><tab>
| V12 suggestion: let the VariableExpand key operate ONLY on the
| variable
| whose name is "under" the cursor, instead of all variables in the
| whole
| command line.
| ---End Quote---
| I disagree with that. I find it very useful to expand all the
| variables at once.
| Rex, if you're thinking about changing this, please consider a
| configurable ini-option like "Ctrl/X expands all variables or just
| one" [all|ONE].

Try a command like this:

for %x in (%appdata%\mydata\alpha\*) echo %@filesize[%x] %x

and decide that you need APPDATa expanded so you could use TAB completion
for one more level down, after you type the whole command, and this is what
you'll see:

for 1 in (c:\documents ...\mydata\alpha\*) echo 0 1

so you need to go back and retype the command.

The OP's suggestion that tab-completion act as variable expansion would have
worked. For the more general case I think we might just want another key
defined for command editing, which expands only the variable under the
cursor. If that happens to be a "compound variable", expansion would go as
far as the specific object, but no further. For example, if you have the
construct %@left[5,%@name[%[z%x]]] in the command line, and the cursor is on
the Z, only z%x would be expanded, but not @name. With the cursor somewhere
in the @name that function would also be evaluated.
--
Steve
 
May 29, 2008
571
4
Groton, CT
dcantor wrote:
| ---Quote (Originally by Steve Fbin)---
| <ctrl><tab><ctrl><tab>
| V12 suggestion: let the VariableExpand key operate ONLY on the
| variable
| whose name is "under" the cursor, instead of all variables in the
| whole
| command line.
| ---End Quote---
| I disagree with that. I find it very useful to expand all the
| variables at once.
| Rex, if you're thinking about changing this, please consider a
| configurable ini-option like "Ctrl/X expands all variables or just
| one" [all|ONE].

Try a command like this:

for %x in (%appdata%\mydata\alpha\*) echo %@filesize[%x] %x

and decide that you need APPDATa expanded so you could use TAB completion
for one more level down, after you type the whole command, and this is what
you'll see:

for 1 in (c:\documents ...\mydata\alpha\*) echo 0 1

so you need to go back and retype the command.

The OP's suggestion that tab-completion act as variable expansion would have worked. {snip}

Yes, I agree that there are times when expanding just one variable would be a good thing. I would still prefer that the current behavior be retained or that it be a configurable option.

Having another keystroke would be okay, but I fear we will run out of keystrokes eventually.


</tab></ctrl></tab></ctrl>
 
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
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
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