new startup tabs

Jan 13, 2013
27
0
Hi. I'm running tcmd 21 build 20 x64 on win10.
I am trying to learn something new w/ tcmd. For many years, I would start tcmd and then manually open a few tabs to the directories I want. Now I want that to happen automatically. I figured out that options > take command > tabs, I can type the full path to tcc.exe and that would open as many tabs as I do this for.

What I cannot get to work is then changing into the directory I want for each tab. For example, I want one tab to be in %gopath\src. I tried entering this in the directory configuration option, and trying to pass a cd command to tcc. It either does not work or I get an error message.

How do I get a new tab to open upon starting tcmd, and log tcc into the directory I want?

--rob solomon
 
Jan 13, 2013
27
0
That helps. Long ago I put a cd in my tcstart.bat so that I could load my alias file from %userprofile\Documents

So my follow up question, what is the recommended best way to load the same alias file for all tcmd/tcc instances regardless of version?
 
Jan 13, 2013
27
0
I need to add that I have versions of tcmd that go back decades. So let me rephrase my question, and limit myself to tcmd >= 17, and for tcc/le which I use for my VMs. All use the same alias copied to where it needs to be.
 

rconn

Administrator
Staff member
May 14, 2008
12,344
149
Are you running global aliases (in which case only one of your tabs needs to run SHRALIAS)? You can put a check in TCSTART to see if SHRALIAS is loaded and skip it if it's already there. If not, load SHRALIAS and do a alias /r.

If you're running local aliases, just put an unconditional "alias /r" in your TCSTART.
 
Jan 13, 2013
27
0
I used to do that. But then I got tripped up over directories and where to put my alias file, I call ALIASDEF.TXT.

So if I put an unconditional alias/r ALIASDEF.TXT, where does my ALIASDEF.txt have to be?

And I am not using local aliases, only global ones. I don't know what SHRALIAS is.
 
May 20, 2008
11,400
99
Syracuse, NY, USA
SHRALIAS is an internal command which starts SHRALIAS.EXE. SHRALIAS.EXE guards 4 lists (or however many it finds) so they continue to exist when TCC is not running. New TCCs with global lists will attach to those lists instantly. The lists are history, dirhistory, alias, and function. I use all the lists globally, all the time. Use any that you like. If the system or user variable SHRALIAS_SAVE_PATH is set, SHRALIAS.EXE will save the lists when it exits (for me, that's at logoff). Here's what I do. The files are called history.sav, dirhistory.sav, alias.sav, function.sav.

In a Windows logon BTM ...

:: go where the lists are stored
cdd %SHRALIAS_SAVE_PATH
:: load the lists
do c in /L history dirhistory alias function ( %c /r %c.sav )
shralias
cdd -

I never think about it again. When I logoff, shralias.exe saves the lists before it exits. The lists are always there, for all TCC sessions, as long as the logon session lasts (which can be weeks or months here).
 
Jan 13, 2013
27
0
Thanks Vince. But how do you get those 4 files created initially? And how do you change them?

Over time, my aliases have changed since I first wrote them sometime in 1988 or so. I think you have been using tcmd just as long.
 
May 20, 2008
11,400
99
Syracuse, NY, USA
They should be created automatically upon logoff or SHRALIAS /U. They're not loaded automatically (that's why I load them in a logon script). I don't usually edit them. Any changes to history, dirhistory, functions, or aliases go into the (guarded) lists which are saved (as above). You can edit them and perhaps re-load them. They're Unicode, so use notepad or something else that handles Unicode (and preserves the BOM) if you edit them. As I said, I never think about them. Whatever the state of my global history, dirhistory, function, and alias lists, they're remembered (automatically) on logoff and restored (via my logon script) upon logon.
 
May 20, 2008
11,400
99
Syracuse, NY, USA
Why aren't you including the path to the alias file? E.g., alias /r C:\Foo\Aliasdef.txt ?
Who, me? ... because I CDD to where they are.

Code:
:: go where the lists are stored
cdd %SHRALIAS_SAVE_PATH
:: load the lists
do c in /L history dirhistory alias function ( %c /r %c.sav )
 
Jan 13, 2013
27
0
David, that occurred to me after I posted. After all, the act of writing stimulates more thought. At least that has always happened to me. I do that now. I made 2 changes to my tcstart.bat because of this discussion: I am now using shralias, and I now do include the path to the alias file, in the form of "%programdata\JP Software\ALIASDEF.TXT"

Thanks to all of you who responded.
 
Similar threads
Thread starter Title Forum Replies Date
CWBillow TCMD 10 and Startup Tabs Support 10
fishman@panix.com Startup Folder? Support 3
fishman@panix.com Wierd startup. Support 7
D Documentation Help "Startup" page does not describe global lists Support 0
fpefpe startup switches Support 2
fishman@panix.com Problem at Startup of TCC Support 3
C How to bypass UAC warning when shortcut in \Startup folder ? Support 9
C Control Everything CPU usage at startup? Support 7
D Envar _tcexit has value, even with /IX startup parameter Support 0
Phileosophos Startup tab layout Support 2
Robert Kantor Startup Defaults Support 7
J TCC at Windows Startup Support 11
Mike Applebee SHRALIAS crashes on startup Support 2
E How to? Load Alias File on Startup Support 3
R V19 - At startup, TCC save directory in the directory history list Support 2
Glenn Bowes Strange text at startup Support 5
D Documentation TCC | Configuration | Conf dialog | Startup Support 0
J TCMD 18 Startup Support 3
J Startup folder Support 6
tmaynard How to? Any way to run a command in a new tab at startup? Support 18
T How to? Adding TCC to startup folder Support 6
B How to? Pre-set _tcfolder on startup when Folders is set Auto-Hide Support 6
C Startup folder not working on v15 Support 6
greyfairer Very slow startup since last Windows 7 Update (14.03.59 x64) Support 9
7 TCC startup crash in Windows 8 Pro x64 Support 20
K Take Command startup problem Support 7
vefatica New desktop and StartUp folder? Support 4
vefatica Wrong startup file? Support 1
J Take Command Slooow Startup Support 1
F Click a .btm file with "TCC Startup Options" in effect. Support 8
B TCC Startup Error Support 12
mikea TCC v12 startup questions Support 15
L A little startup help from an old CLI guy please. Support 14
M Running a batch file at Windows startup... Support 8
Patulus TCC 11.00.39 hangs on startup Support 5
T Access violation upon TC startup Support 2
jcalcote Apache Maven startup batch file issues Support 3
fishman@panix.com New startup problem... Support 10
L Very long startup times - solved for me Support 15
deleyd Speed up startup of TCMD? Support 2
S Startup/Shutdown order of events for TCC Support 6
R Don't wake up external drives on startup Support 2
S TCC V9 startup option documentation Support 3
T Open & Configure multiple TCC windows on STARTUP Support 4
S Increasing Font Point Size in Command Tabs Support 2
S Setting Tabs=Bottom makes text turn black Support 6
vefatica Tabs dialog? Support 9
CWBillow Back up TCMD tabs Support 2
A How to? Copy+Paste in TCMD tabs with Ctrl-Shift-Ins? Support 5
rps TCMD Tabs priority option setting Support 0

Similar threads