| sure thing, much cleaner and simpler. Thanks! if (( ! ${+aliases[=]} )); then # only do this once, even if the file is sourced multiple times function quote_expression() { if [[ ${BUFFER} =~ ^=.* ]]; then # used below in history hack typeset -g calc_hist="${BUFFER}" # add quotes BUFFER="= ${(q-)${${BUFFER#=}# }}" fi } # as per Bart Schaefer's comment add-zle-hook-widget line-finish quote_expression ... } Next thing: force my luck, and make it also do stuff like printf “the answer is %s\n” $(= 4 * 3) Kind regards, erik.
—
Erik Wybouw
|