Contents | < Browse | Browse >
ALIAS [variable] [definition]
* ALIAS assigns a variable name to a definition. The variable name
can be up to 15 characters long, and the definition can be up to
about 360 (250) characters long.
* Function Keys
eg. alias f1 "ed df0:s/startup-sequence^M"
This example assigns the unshifted F1 key to the text enclosed in
quotes. Note that the ^M characters puts an auto carriage return
in the definition.
eg. alias F10 "cd df0:^M"
This sets shifted F10 to "cd df0:<CR>".
Other egs. alias f2 "cd df1:^M"
alias f4 "genim2 "
alias F9 "scribble df0:text/"
alias f1 "a68k z.a;blink z.o to z^M"
* The secondary use of ALIAS is to assign command aliases.
eg. alias mv rename
This allows an alternate name for rename. i.e. mv.
So you could type
mv oldname newname {to rename oldname to newname}
eg. alias as a68k
alias pp powerpacker
alias go "a68k zsh.s;blink zsh.o to zsh"
alias cped "copy df0:c/ed"
You would use this last alias, if you need to copy a particular
file a lot. So, to copy c/ed to ram: use:-
cped ram:
* You can also pass external parameters to an alias.
eg. alias al "%1 a68k $1.s;blink $1.o to $1"
Typing
al test
will assemble test.s using a68k, then blink test.o to become test.
You can specify upto eight parameters to pass to a command alias.
At the start of the alias definition, specify the parameters to pass
with the variables %0 thru %7. These need not be in sequence. The
first %n will be assigned to the first parameter, the 2nd %n to
the 2nd parameter etc.
Insert the corresponding variables $0 thru $7 at the points in the
alias definition where that parameter is to appear.
eg. alias disp "%1 %2 %3 echo "$3 $2 $1""
alias cram "%0 %1 %2 %3 copy $0 $1 $2 $3 ram:"
alias go "%5 %1 %6 %2 echo "1st-$5 2nd-$1 3rd-$6 4th-$2""
* Command aliases can be nested to 1 level.
eg. alias clear "echo ^L";alias cdir "%1 clear;cd $1;dir"
* An important point about aliases, is that you can redefine the
existing internal command names.
eg. alias help "type help_screen"
This would make it so that pressing HELP or typing H E L P would
not generate the standard help command list, but would type the
file called help_screen to the screen. Similarly
eg. alias copy c:copy {replace copy by disk-based copy}
alias info c:dfree
alias assign .assign {replace assign by disk-based assign}
* Typing ALIAS with no parameters at all, will generate a list of all
current alias definitions.
eg. alias
* See UNALIAS for how to remove alias definitions.