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

Re: zsh-4.0.1-pre4 : manpath and MANPATH



On May 21, 10:48am, Peter Stephenson wrote:
}
} zmodload -i zsh/parameter
} for param in ${(k)parameters}; do
}   type=${parameters[$param]}
}   [[ $type != *export* || $type = *special* ]] && continue
}   unset $param
} done
} 
} Somebody may be able to think of a faster way.

A challenge, eh?  How about:

    setopt extendeglob
    unset ${(k)parameters[(R)^*(readonly*|export|special)]}

Of course this clobbers things like ZSH_NAME and ZSH_VERSION, which it
might be pretty difficult to restore to sane values.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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