1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Speaking of VIEW

Discussion in 'Support' started by vefatica, Aug 15, 2015.

  1. vefatica

    Joined:
    May 20, 2008
    Messages:
    8,054
    Likes Received:
    30
    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
     
  2. vefatica

    Joined:
    May 20, 2008
    Messages:
    8,054
    Likes Received:
    30
    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.
     
  3. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,034
    Likes Received:
    0
    Did you forget to use /B for bare?

    Or whatever the switches are to not show the header or the footer.
     
  4. vefatica

    Joined:
    May 20, 2008
    Messages:
    8,054
    Likes Received:
    30
    You saw the command, "dir /s v:\ | view". That's what I meant. The rest of the output has the expected headers.
     
  5. vefatica

    Joined:
    May 20, 2008
    Messages:
    8,054
    Likes Received:
    30
    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
     
  6. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,034
    Likes Received:
    0
    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]
    
    
    
     
  7. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,991
    Likes Received:
    84
    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.
     
  8. vefatica

    Joined:
    May 20, 2008
    Messages:
    8,054
    Likes Received:
    30
    Pretty much the same:
    upload_2015-8-15_16-43-1.png
     
  9. vefatica

    Joined:
    May 20, 2008
    Messages:
    8,054
    Likes Received:
    30
    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
     
  10. vefatica

    Joined:
    May 20, 2008
    Messages:
    8,054
    Likes Received:
    30
    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
     
  11. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,991
    Likes Received:
    84
    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.
     
  12. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,991
    Likes Received:
    84
    That doesn't tell me anything -- the issue is what is in your TCC child pipe processes, not the parent process.
     
  13. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,034
    Likes Received:
    0
    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
     
  14. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,991
    Likes Received:
    84
    You have a PAUSE in your TCSTART.btm??

    WINDOW MAX is pointless if you're running in a TCMD tab window.
     
  15. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,034
    Likes Received:
    0
    PAUSE is just to see what the values of _PIPE and _TRANSIENT are.....
     
  16. vefatica

    Joined:
    May 20, 2008
    Messages:
    8,054
    Likes Received:
    30
    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.
     
  17. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,034
    Likes Received:
    0
    _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.
     
  18. w_krieger

    Joined:
    Nov 2, 2008
    Messages:
    176
    Likes Received:
    0
    How does view pick up piped text, I didn't think the full version understood text on a 4nt pipe.
     
  19. vefatica

    Joined:
    May 20, 2008
    Messages:
    8,054
    Likes Received:
    30
    Temporary files.
     

Share This Page