1 ### vim:ft=zsh:foldmethod=marker
2 ## get and set the current context
3 ## Copyright: 2009, Frank Terbeck <ft@bewatermyfriend.org>
5 # If called without arguments, it spits out the current context.
6 # If called with -l <string> it sets the <localpart> of the context
7 # to <string>. If called with -d, it sets the <localpart> to its default.
9 LOOKUP_guard || return 1
13 lu_parseopts_args=( d bool l string )
14 LOOKUP_parseopts "$@" || return 1
15 if [[ ${opts[-d]} == 'yes' ]] ; then
17 elif [[ -n ${opts[-l]} ]] ; then
18 lookup_lp="${opts[-l]}"
20 printf ':lookup:%s:%s:%s' ${lookup_ei} ${backend} ${lookup_lp}