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

Re: User installation script for new completion



On May 2,  4:52pm, Bart Schaefer wrote:
} Subject: Re: User installation script for new completion
}
} You don't mean this, do you?
} 
} 	typeset -A options
} 	options=($(setopt kshoptionprint;setopt))
} 	[[ -o kshoptionprint ]] || options[kshoptionprint]=off
} 	[[ -o monitor ]] && options[monitor]=on
} 	[[ -o zle ]] && options[zle]=on
} 
} 	for i in ${(k)options}
} 	do case $options[$i] in
} 	on) setopt $i;;
} 	off) unsetopt $i;;
} 	esac done

Even better:

	unsetopt ${(k)options[(R)off]} no${(k)^options[(R)on]}

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



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