Alternate Form of Global Aliasing

A somewhat messy way to do global aliasing (and it can't really be called 'global') is to put a trailing space in the value of an alias.


  lyric > alias l="ls -l "
  lyric > alias vls="/var/log/syslog"

Then, everytime you use the l alias, zsh checks to see if the next word after l is also an alias. Therefore, after typing the above alias commands, zsh will expand 'l vls' to 'ls -l /var/log/syslog'.

  lyric > l vls
  -rw-r--r--   1 root     other         245 Feb 15 08:23 /var/log/syslog