Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: ZSpeak! Only Zsh can do this!



> First of all, I want to introduce myself:
> I am a fanatic linux user/developer since 1997
> and recently (its a shame that it took so long) I discovered
> Zsh and I want to say: You guys did a great job!

Thank you.  Don't look at the code too closely :-/.
> # BUG: Doesnt read in the spell list?? Any Zmagician?
> speech-load-spell-list () {
>     typeset -A zspeak_spell
>     [[ -z $ZSPEAK_SPELL_LIST ]] && [[ -s "~/.zsh/spell.list" ]] \
> 				&& ZSPEAK_SPELL_LIST='~/.zsh/spell.list'

I think you want
    [[ -z $ZSPEAK_SPELL_LIST ]] && [[ -s ~/.zsh/spell.list ]] \
				&& ZSPEAK_SPELL_LIST=~/.zsh/spell.list

since the `~' doesn't get expanded if it's quoted.

>     if [[ -s "$ZSPEAK_SPELL_LIST" ]]; then
>         zspeak_spell=(${$(<${ZSPEAK_SPELL_LIST})})

You don't need the outermost ${...}.  I think it's harmless here.

    if [[ -s "$ZSPEAK_SPELL_LIST" ]]; then
        zspeak_spell=($(<${ZSPEAK_SPELL_LIST}))

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR Ltd., Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK                          Tel: +44 (0)1223 392070



Messages sorted by: Reverse Date, Date, Thread, Author