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

commit to history



Hello, I have a zle widget that I use to send the current buffer to the history without executing it, and then start a new prompt (to clear the buffer and reset the current history position), it is implemented a such:

commit_to_history() {
  print -s ${(q)${(z)BUFFER}}
  zle send-break
}

the send-break widget returns a status code 1, and since I have a precmd that displays the last status code, I was wondering if it is in some way possibile to suppress that return status. I have tried with {zle send-break} always {TRY_BLOCK_ERROR=0} but didn't help. It is a very minor annoyance, but I am curious nonetheless
thanks

Pier Paolo Grassi


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