Shell Commands/Alias

From MorphOS Library

Revision as of 19:29, 2 March 2015 by JPV (talk | contribs) (Created page with "'''Alias''' - Sets or displays command aliases. NAME, STRING/F <nowiki> NAME - name of the Alias. STRING - string to use when this alias is encountered</nowiki> Alias crea...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

< Shell Commands

Alias - Sets or displays command aliases.

NAME, STRING/F

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 !
  MorphOS:>

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
  disk.info                         5792 ----rwed Today 21:32:44
  2 files - 3 directories - 6542 bytes used