Speaking of VIEW

May 20, 2008
12,165
133
Syracuse, NY, USA
The one command below results in all the output seen in the tab. Below that is the beginning of VIEW's display; note that some headers and blank lines are missing. All happens correctly if I do the same thing in a console.
upload_2015-8-15_0-38-43.png


upload_2015-8-15_0-40-24.png
 
May 20, 2008
12,165
133
Syracuse, NY, USA
Regarding the above, it's interesting to note that neither the text "Dir2" nor the text "2015-20" appear in the output of that command.
 
Apr 2, 2011
1,607
15
55
North Carolina, USA
Did you forget to use /B for bare?

Or whatever the switches are to not show the header or the footer.
 
May 20, 2008
12,165
133
Syracuse, NY, USA
Here's a complete and slightly more concise one. First, in the TCMD tab, the (correct) contents on v:\test\, then the troublesome command (piped through VIEW) and its in-tab consequences. Second, the entire output shown by VIEW.

upload_2015-8-15_12-57-33.png


upload_2015-8-15_12-58-41.png
 
Apr 2, 2011
1,607
15
55
North Carolina, USA
Sorry - I don't use View so I thought it was wanting a filelist, a file per line, to show. Not whatever STDIN was with the pipe.

Here is my errors with VIEW

Code:
TCC  18.00.30 x64   Windows 7 [Version 6.1.7601]
Copyright 2015 JP Software Inc.  All Rights Reserved
Registered to Charles S. Galloway - 5 System License

FixNames v0.28.0 loaded.
[C:\Program Files\JPSoft\TCMD18_x64]dir | view
TCC: (Sys) C:\TCMD\TCEXIT.btm [3]  The system cannot find the file specified.
"fixnames"
TCC: C:\TCMD\TCEXIT.btm [5]  No aliases defined

[C:\Program Files\JPSoft\TCMD18_x64]
 

rconn

Administrator
Staff member
May 14, 2008
12,556
167
Not reproducible here (either Vince's or Charles's problems).

Charles - your problem is definitely with your TCSTART (which is trying to do things it shouldn't when piping to an internal command in a child shell).

Vince, try it without your TCSTART / aliases / plugins.
 
May 20, 2008
12,165
133
Syracuse, NY, USA
And when that was over, these were in my history:
Code:
Volume in drive V is DATA  Serial number is c007:d3e4
Directory of  V:\*
2015-08-15  12:46  <DIR>  .
2015-08-15  12:46  <DIR>  ..
-03  14:21  42  filelist
 
May 20, 2008
12,165
133
Syracuse, NY, USA
Other crazy things happen ion TCMD with pipes ... things that don't happen in consoles. Here's the partial result of "dir | cls"
Code:
v:\> v:\> TCC: (Sys) The parameter is incorrect.
 "in"

v:\> TCC: Unknown command "Directory"

v:\> v:\> TCC: (Sys) The system cannot find the path specified.
 "V:\"

v:\> TCC: (Sys) The system cannot find the path specified.
 "V:\"

v:\> TCC: (Sys) Access is denied.
 "V:\empty"

v:\> TCC: (Sys) Access is denied.
 "V:\foo"

v:\> TCC: (Sys) Access is denied.
 "V:\ProgramData"

v:\> TCC: (Sys) Access is denied.
 "V:\prospero"

v:\> TCC: (Sys) Access is denied.
 "V:\test"

v:\> TCC: Unknown command "2015-08-14"

v:\> TCC: Unknown command "2014-11-17"

v:\> TCC: Unknown command "2015-05-18"

SNIP
 

rconn

Administrator
Staff member
May 14, 2008
12,556
167
Other crazy things happen ion TCMD with pipes ... things that don't happen in consoles. Here's the partial result of "dir | cls"

None of that is reproducible on any of my systems -- which isn't surprising, since there is absolutely no difference in pipe behavior when running in a console vs. running in TCMD. You've got a configuration difference between your standalone TCC processes & your TCMD tab windows.

If this was a TCMD / TCC issue, I'd already have thousands of complaints about it. I pipe in TCMD tab windows many times a day, as do most other TCMD users.
 
Apr 2, 2011
1,607
15
55
North Carolina, USA
Not reproducible here (either Vince's or Charles's problems).

Charles - your problem is definitely with your TCSTART (which is trying to do things it shouldn't when piping to an internal command in a child shell).

Code:
echo %_PIPE, %_TRANSIENT
PAUSE

IFF %_PIPE EQ 1 THEN
  QUIT
ENDIFF

IFF %_TRANSIENT EQ 1 THEN
  QUIT
ENDIFF

alias unknown_cmd C:\Z_UserFiles\JPSoft\BTM_000\UC.BTM

plugin /l c:\TCMD\Plugins\fixnames\FixNames-x64.dll

iff %@index["%cmdcmdline",/c type TP] gt 0 .and. %_pipe eq 1 then
  rem   TPIPE pipe process
  if %@regex[^TP\d+\.tmp$,%@word[-0,%cmdcmdline]] eq 1 quit
endiff

alias /r C:\TCMD\alias.txt

window max

Is my entire TCStart.btm
 
May 20, 2008
12,165
133
Syracuse, NY, USA
OK, the culprit was this line in TCSTART.
Code:
IF %_TCTAB == 1 TRANSIENT OFF
That's a recent addition and isn't in the TCSTART of any previous versions. I don't recall what I might have been testing, or what other reason I might have had for putting it there. I also don't understand exactly how it screwed things up.
 
Apr 2, 2011
1,607
15
55
North Carolina, USA
_TRANSIENT returns 1 if the current shell is transient (started with a /C, see Command Line Options for details), or 0 otherwise

TRANSIENT allows you to change the shell's transient mode (i.e., whether it was started with a /C), so that you can make a transient session permanent (or vice versa).

So both are valid.
 

Similar threads