### vim:ft=zsh:foldmethod=marker ## get and set the current context ## Copyright: 2009, Frank Terbeck # If called without arguments, it spits out the current context. # If called with -l it sets the of the context # to . If called with -d, it sets the to its default. LOOKUP_guard || return 1 local opt local -A opts lu_parseopts_args=( d bool l string ) LOOKUP_parseopts "$@" || return 1 if [[ ${opts[-d]} == 'yes' ]] ; then lookup_lp="-default-" elif [[ -n ${opts[-l]} ]] ; then lookup_lp="${opts[-l]}" else printf ':lookup:%s:%s:%s' ${lookup_ei} ${backend} ${lookup_lp} fi return 0