PDA

View Full Version : add a new alias


Eric Pement
2008-07-25, 14:20
To use this, you must have this command in your TCSTART.BTM file:

alias /r "c:\path\to\alias.ini"

And then in the alias.ini file, you keep all your commonly used aliases, e.g.,

calc=echo The answer is %@comma[%@eval[%$]]
clear=*cls
getclip=*type clip:

and then, assuming your favorite text editor is named TDE (http://www.geocities.com/jadoxa/tde/) (Thomson-Davis Editor), add this next one:

addalias=tde c:\path\to\alias.ini %+ alias /r c:\path\to\alias.ini %+ echo New aliases loaded!
I am now able to edit aliases in a flash, instantly activate them, and save my changes so they will be active the next time I run TakeCommand. (Of course, if you don't use TDE as your editor, just replace it with whatever is a quick and preferably console-mode text editor.)

harvey
2009-07-26, 18:06
I do it just a little differently. After I create a new alias, I use an alias called save. It looks like:

Save = al>c:\4nt\alias.bak&type c:\4nt\alias.bak | c:\windows\system32\sort > c:\4nt\alias.txt&una *&alias /r c:\4nt\alias.txt

Where "al" is an alias for "alias".

Where "al>c:\4nt\alias.bak" writes the alias file to c:\4nt\alias.bak.
Then "Type c:\4nt\alias.bak | C:\window\system32\sort > c:\4nt\alias.txt" sorts the backup file alphabetically and writes it to the alias.txt,

Where una is an alias for "unalias".
Then "una *" removes all the aliases in memory.
Then "Alias /r c:\4nt\alias.txt" reloads the aliases.


I also have a "load.bat" file on the root of the C drive.
It is "alias /r c:\4nt\alias.txt"

I use it in the event that I modified an alias and it doesn't function properly. I simply type in "Load" and all is forgiven.