Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

ALIAS /R in TCSTART.BTM

Jan
616
15
Code:
TCC  21.00.15 x64   Windows 7 [Version 6.1.7601]
TCC Build 15   Windows 7 Build 7601  Service Pack 1

When loading aliases with
Code:
 alias /r
from TCSTART.BTM, it does not ignore commented lines (with a preceding colon character " : ").

Problem also exists in TCMD20
Code:
TCC  20.11.44 x64   Windows 7 [Version 6.1.7601]
Copyright 2017 JP Software Inc.  All Rights Reserved
Registered to xxxxxxxxxx

Works fine from the command prompt afterwards.

After repeated tests, problem occurs when starting TCMD, not when starting TCC by itself.
 
Same one, well, except for TCMD20 and TCMD21 being different directories with a copy of the same TCSTART file.

And to eliminate further confusion, this is has been my alias command since forever...

Code:
alias /r %@path[%comspec]alias.ini

Screenshot - 20170425_102212.png


Edit: I keep my alias file sorted, when the ALIAS file is loaded under TCC it loads it in the order in the file, whereas TCMD with a commented line inconsistently loads out of order.

Edit2: Disabled plugins by renaming plugins directory. Same thing.
 
Last edited:
Not reproducible here. ALIAS /R doesn't know (or care) if you're running it from a batch file, the command line, a TCC stand-alone shell, or a TCMD tab window. And the ALIAS code doesn't make any exceptions - any line beginning with a colon gets discarded.

And ALIAS /R doesn't do anything to sort the file; it saves the aliases in the order they're read.

From your description of the symptoms, I'd say it's 99% likely that your TCC tab windows in TCMD are loading a different alias.ini file. Search your system and see if you have any other copies.
 
I have 4 each of tcstart.btm and alias.ini. Each is called by their respective command interpreter.
Code:
C:\BIN\JPSoft\TCCLE13\tcstart.btm
C:\BIN\JPSoft\TCCLE14\tcstart.btm
C:\BIN\JPSoft\TCMD20\tcstart.btm
C:\BIN\JPSoft\TCMD21\tcstart.btm
C:\BIN\JPSoft\TCCLE13\alias.ini
C:\BIN\JPSoft\TCCLE14\alias.ini
C:\BIN\JPSoft\TCMD20\alias.ini
C:\BIN\JPSoft\TCMD21\alias.ini
Could it be that the alias line I'm commenting out is PRE_EXEC? And that it's making a call to a non-existent function (due to a currently inoperative plugin)?
Here's my alias.ini file. Line 19 is the offending line. Try it out.
Code:
7z=C:\BIN\7-ZipPortable\App\7-Zip64\7z.exe
bc=C:\BIN\BeyondCompare4\BComp.exe
calc=c:\bin\calc.exe
commit=fossil com -m "%$"
d=pdir /(dy-m-d  th:m zc  @if[%%@len[%%@descript[*]] gt 0,%%@if[%%@len[%%@filename[*]] ge 23,%%@left[21,%%@filename[*]]+ : %%@descript[*],%%@filename[*]%%@repeat[ ,%%@max[0,%%@eval[22-%%@len[%%@filename[*]]]]] : %%@descript[*]],%%@filename[*]]) /k /m /h /d
df=for %d in ( %_drives ) if %@ready[%d] eq 1 echo %d %@format[12,%@comma[%@disktotal[%d,M]]] %@format[12,%@comma[%@diskused[%d,M]]] %@format[12,%@comma[%@diskfree[%d,M]]]  %@eval[ 100-(%@diskfree[%d] / %@disktotal[%d]*100=0)]%%
dirslash=pdir /(@adddirslash[*])
ed*it="C:\BIN\Sublime Text 3\sublime_text.exe"
emed=C:\BIN\EmEditor\EmEditor.exe
ep=for /t";" %p in (%path) echo %p
epp=C:\BIN\EditPadPro7\EditPadPro7.exe
fo*ssil=*fossil
here=explorer .
hex=echo %@eval[%1=H]
kdel=del /k /nnt /q /s /x /y /z
md=*md /Ne
mdd=md /d
mt*rw=c:\bin\mtrw.exe %*
: PRE_EXEC=set STARTTIME=%@CLOCK[0]
realias=alias | sort -f > %@path[%comspec]alias.ini %+ unalias * %+ alias /r %@path[%comspec]alias.ini
refunction=function | sort -f > %@path[%comspec]function.ini %+ unfunction * %+ function /r %@path[%comspec]function.ini
ren=*ren /q
snap=*snap /q
td=c:\bin\timedir.exe
tm="c:\Program Files\TortoiseSVN\bin\TortoiseMerge.exe"
type=*type /b
vim=C:\BIN\Vim\vim80\gvim.exe
winrar=c:\bin\winrar\winrar.exe
xcmd=for /w %i in (%@quote[::%@unquote[%2]]) %1 %@quote[%@filename[%i]] %@quote[%@xreplace[%@quote[%@unquote[%2]],%@quote[%@unquote[%3]],%@quote[%@filename[%i]]]]
zerodel=del /[s0,0] *
 
EPIPHANY!! I'm firing up TCCLE14 at the same time and it's ALIAS list still includes the offending alias since I'm still using it there. I killed starting the TCCLE14 tab (by pointing to a non-existent file) and the problem went away. I'm 99% sure I'm not running shralias (Windows Task Manager doesn't show it as a process or service).

Edit: I reenabled TCCLE14 and changed TCC options to turn on the "Local aliases" switch. Looks like that fixed it. Which means, I'm guessing, TCMD automatically shares aliases between all open tabs?

Edit 2: If I start both TCC and TCCLE from CMD at the same time loading different aliases with
Code:
start \bin\JPSoft\tcmd21\tcc.exe & start \bin\JPSoft\TCCLE14\tcc.exe
there is no problem.

Edit 3: I think that's what you were trying to say above with
I'd say it's 99% likely that your TCC tab windows in TCMD are loading a different alias.ini file
but I wasn't interpreting it that way.
 
Last edited:
This has never bit me in the butt before today, so it never dawned on me. Thanks.
 
Calc is a little 50K executable that I compiled from MAPM (Mike's Arbitrary Precision Math). It's for little one off calculations. It uses RPN so I get to reminisce about using HP calculators.
Code:
calc [-d##] <numbers,operators>                         [Version 2.3]
      -d : specify decimal places, default = 30         [MAPM Version 4.9.5]

operators :  + : add                           s : sin
             - : subtract                      c : cos
             x : multiply (*)                  t : tan
             / : divide                        q : sqrt
             \ : integer divide (i)           as : arc-sin
             ! : factorial                    ac : arc-cos
            x2 : x ^ 2                        at : arc-tan
             r : 1 / x                       at2 : arc-tan2 (y,x)
            lg : log                           e : e ^ x
          lg10 : log10                         p : y ^ x
            xy : x<>y (exchange x,y)           n : +/- (negate (h))
            hs : sinh                        has : arc-sinh
            hc : cosh                        hac : arc-cosh
            ht : tanh                        hat : arc-tanh
             b : cube root                     d : dup (HP-Enter)
             f : floor                        cl : ceil
           gcd : GCD                         lcm : LCM
            s# : save memory, # = 0-9,a-z     r# : recall memory, # = 0-9,a-z
            pi : 3.14159..                   mod : modulus (%)
 

Similar threads

Back
Top