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 Sat, Apr 24, 2021 at 2:49 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> OK, then this:

Let's make the sticklers happy and fix the incomplete print commands ...

execute-command () {
  case $CONTEXT in
    (cont|start) print -rz -- "$PREBUFFER$BUFFER"
      print -rS -- "${${(q-)@}}"
      eval "${(q-)@}" ;;
    (*) return 75 ;;
  esac
  zle .send-break
}




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