home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format 61
/
af061sub.adf
/
SmileyV3.lha
/
smiley.doc
< prev
Wrap
Text File
|
1994-05-16
|
2KB
|
78 lines
NAME
smiley - print or explain smileys
SYNOPSIS
smiley [-V] [-e] [-l] [-f] [_s_m_i_l_e_y...]
DESCRIPTION
_S_m_i_l_e_y is a program for smiley junkies who like to have all
the smileys at their fingertips.
The options have the following meaning:
-V Print the version of the program and the number of
faces and definitions.
-e Explain the face found in the environment variable SMI-
LEY.
-l Print a listing of all the known smileys, with explana-
tions.
-f Print a random smiley, face only.
_s_m_i_l_e_y
Explain the given smiley.
When invoked with no arguments, _s_m_i_l_e_y prints a random smi-
ley with an explanation.
EXAMPLE
Here are some _k_s_h(1) functions that put a smiley into your
prompt.
ps1sed()
Transform the standard input so that it will display
properly when it is made part of PS1 in _k_s_h. (That is,
quote ! $ \ if they appear.) These are the transfor-
mations:
! -> !!
$ -> \$
\ -> \\
Note that a ! must be doubled instead of quoted with
\ in order to display.
ps1sed()
{
sed 's/!/&&/g
s/[$\\]/\\&/g'
}
ps1()
Put a new smiley into PS1. Use _p_s_1_s_e_d to make sure any
characters in the smiley that are special to the shell
are quoted appropriately.
ps1()
{
export SMILEY="`smiley -f`"
PS1=`print -r - "$SMILEY" | ps1sed`" "
}
CAVEATS
The list of smileys is the personal collection of the
author, so there are bound to be some missing.
Multiline smileys and the ``invisible smiley'' are absent
from _s_m_i_l_e_y because the author does not want a multiline or
invisible prompt.
AUTHOR
DaviD W. Sanderson (dws@cs.wisc.edu)
COPYRIGHT
(C) Copyright 1991 by DaviD W. Sanderson