zshrc: convert swspeak from alias to function
authorFrank Terbeck <ft@grml.org>
Sat, 22 Dec 2007 06:13:55 +0000 (07:13 +0100)
committerFrank Terbeck <ft@grml.org>
Sat, 22 Dec 2007 06:13:55 +0000 (07:13 +0100)
etc/zsh/zshrc

index 2fa12af..c38176a 100644 (file)
@@ -1025,21 +1025,20 @@ iso2utf() {
 }
 
 # set up software synthesizer via speakup
-# TODO: make this a function?
-alias swspeak='
-  aumix -w 90 -v 90 -p 90 -m 90
-  if ! [[ -r /dev/softsynth ]] ; then
-     flite -o play -t "Sorry, software synthesizer not available. Did you boot with swspeak bootoption?"
-     return 1
-  else
-     setopt singlelinezle
-     unsetopt prompt_cr
-     export PS1="%m%# "
-     nice -n -20 speechd-up
-     sleep 2
-     flite -o play -t "Finished setting up software synthesizer"
-  fi
-'
+swspeak() {
+    aumix -w 90 -v 90 -p 90 -m 90
+    if ! [[ -r /dev/softsynth ]] ; then
+        flite -o play -t "Sorry, software synthesizer not available. Did you boot with swspeak bootoption?"
+        return 1
+    else
+        setopt singlelinezle
+        unsetopt prompt_cr
+        export PS1="%m%# "
+        nice -n -20 speechd-up
+        sleep 2
+        flite -o play -t "Finished setting up software synthesizer"
+    fi
+}
 
 # I like clean prompt, so provide simple way to get that
 check_com 0 || alias 0='return 0'