Shell Commands/Alias

From MorphOS Library

< Shell Commands

Alias - Sets or displays command aliases.


NAME   - name of the Alias.
STRING - string to use when this alias is encountered

Alias creates aliases, or alternative names, for AmigaDOS commands. Alias can be used to abbreviate frequently used commands or replace standard command names with different names.

NOTE: You can use arguments in an Alias using '[]' (see example below).

Example 1:
  MorphOS:> Alias hi echo "Hello !"
  MorphOS:> hi
  Hello !

Example 2:
  MorphOS:> alias ls list []
  MorphOS:> ls ram:
  Directory "ram:" on Tuesday 25-Jan-05
  T                                  Dir ----rw-d Today 21:56:42
  ENV                                Dir ----rw-d Today 21:32:40
  Clipboards                         Dir ----rw-d Today 21:32:39                         5792 ----rwed Today 21:32:44
  2 files - 3 directories - 6542 bytes used