ALIAS /R in TCSTART.BTM

Jan 19, 2011
604
14
Norman, OK
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.
 
Jan 19, 2011
604
14
Norman, OK
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:

rconn

Administrator
Staff member
May 14, 2008
12,363
150
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.
 
Jan 19, 2011
604
14
Norman, OK
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] *
 
Jan 19, 2011
604
14
Norman, OK
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:
Jan 19, 2011
604
14
Norman, OK
This has never bit me in the butt before today, so it never dawned on me. Thanks.
 
Jan 19, 2011
604
14
Norman, OK
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
Thread starter Title Forum Replies Date
D Can alias pass parameters to for command? Support 3
Jay Sage Issue with CD_ENTER Alias Support 37
Jay Sage Issue with CD_LEAVE Alias Support 3
Jay Sage WAD Failure of Alias Command with /Z Option Support 14
R @select inside alias gives different (insanely small) window Support 7
kb6ojs ALIAS with multiple commands? Support 9
vefatica Can I alias @@Ctrl-Shift-Alt-u? Support 4
D Alias with setdos no longer works Support 21
vefatica TPIPE in an alias? Support 2
Peter Murschall TCC V26.01.3x Debugging has problems with Alias /R Support 1
Peter Murschall CMDebug 26.01.37 has problems with Alias Support 21
samintz How to? Alias or prompt? Support 1
MickeyF expand alias in cmdline with Ctrl-F in TCC Support 21
Jay Sage Directory Alias Access to FTP Servers Support 2
rps How to? Shralias and producing history.sav, alias.sav .. Support 6
J Alias @@F5 hotkey Support 2
vefatica alias.sav not accurate Support 8
Joe Caverly Using a Directory Alias with @iniwrite fails Support 14
N multiple command alias and redirection Support 0
vefatica SETLOCAL ... ALIAS ... pipes Support 2
B TCC 21.01.50 Problem with ALIAS /r and SET /r Support 2
rps How to? Alias/Command line use of *log on/off Support 2
MickeyF alias terminating before it should Support 3
D Alias in batch file Support 3
vefatica Can't execute @ALIAS[...] Support 5
E How to? Load Alias File on Startup Support 3
I Windows 10 console does not allow alt-F4 alias to complete Support 1
MickeyF create an alias with optional parameter Support 4
nickles Alias expansion Support 7
T scrput `` in alias or function Support 2
vefatica Alias works differenltly v16 vs. v17 Support 13
B Alias with multi line definitions not assigned Support 6
jbanaszczyk Alias with space in the name Support 3
jbanaszczyk Alias for internal command Support 8
D Clear alias parameters Support 7
T Fixed multi-line alias issue Support 13
keithg1964 WAD 16.0027 Alias /rz bug Support 8
R In addition to ALIAS /Z and FUNCTION /Z, HISTORY /Z? Support 1
tmaynard How to? Control-U alias for Escape (command line editing) Support 5
C Alias ListEmptyFldrs=??? Support 4
M How to? Put logic into an alias... Support 6
G How to? v15: Can't alias Alt-Z Support 7
nikbackm v15: Problem with ALIAS in command group Support 10
vefatica WAD DO i=1 TO %# in an alias? Support 9
cgunhouse Directory Alias Issue Support 7
C CMD window size and post_exec alias ? Support 6
deleyd How to? Alias in TCMD.INI file? Support 2
M How to? Run a command (alias, actually) on a "timed" basis... Support 13
A strange error in alias Support 9
J Initialise; Alias; Extended directory search Support 2

Similar threads