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

Re: [PATCH] Add execute-command() widget function (was Re: [RFC][PATCH] Add change-directory() widget function)



On Sun, Apr 25, 2021 at 12:58 AM Bart Schaefer
<schaefer@xxxxxxxxxxxxxxxx> wrote:
> execute-command () {
>   case $CONTEXT in
>     (cont|start) print -rz -- "$PREBUFFER$BUFFER"
>       print -rS -- "${${(q-)@}}"
>       eval "${(q-)@}" ;;
>     (*) return 75 ;;
>   esac
>   zle .send-break
> }

I tried it and it's otherwise good, but that last line causes %? == 1
and %(? == true. Can that be fixed somehow?




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